This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Usage: gh-rename-master <newbranch> [<remote>] | |
| # | |
| # Renames the "master" branch of the current repository both locally and on GitHub. | |
| # | |
| # dependencies: GitHub CLI v0.10 | |
| set -e | |
| newbranch="${1?}" | |
| remote="${2:-origin}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jq -R --slurp '{query: ., variables: {input: $ARGS.named}}' \ | |
| --arg name "hello-world" \ | |
| --arg visibility "PRIVATE" \ | |
| --arg ownerId "<ORG-NODEID>" \ | |
| --arg teamId "<TEAM-NODEID>" \ | |
| <<<' | |
| mutation ($input: CreateRepositoryInput!) { | |
| createRepository(input: $input) { | |
| repository { | |
| nameWithOwner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| latest-version() { | |
| curl -fsi https://github.com/github/hub/releases/latest | awk -F/ '/^Location:/ {print $(NF)}' | |
| } | |
| HUB_VERSION="${1#v}" | |
| if [ -z "$HUB_VERSION" ]; then | |
| latest=$(latest-version) || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| comments() { | |
| local issue="${1?}" | |
| shift 1 | |
| paginate hub api --cache 3600 graphql -F issue="$issue" "$@" -f query=' | |
| query ($owner: String = "{owner}", $repo: String = "{repo}", $issue: Int!, $per_page: Int = 30, $after: String) { | |
| repository(owner: $owner, name: $repo) { | |
| issueOrPullRequest(number: $issue) { | |
| ... on Issue { | |
| comments(first: $per_page, after: $after) { | |
| ...Comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.24; | |
| /* | |
| Title: | |
| Multiple Linked List Storage | |
| Description: | |
| Dynamic Storage Contract for storing multiple linked lists each | |
| uniquely identified by a key. Implementation allows for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "archive/tar" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path/filepath" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function iterator() { | |
| const self = this | |
| let i = 0 | |
| return { | |
| next: function() { | |
| return { | |
| done: i === self.length, | |
| value: self[i++] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export EDITOR_XCODEPROJ='open -a XCode' | |
| export EDITOR_TSCONFIG='code' | |
| export EDITOR_DEFAULT='atom' | |
| export EDITOR='magic-open' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # primary HTTPS config | |
| server { | |
| listen 443 ssl; | |
| server_name mislav.net; | |
| ssl_certificate /etc/letsencrypt/live/mislav.net/cert.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/mislav.net/privkey.pem; | |
| root /home/app/blog/_site; | |
| index index.html; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| S-EP | episode title | score | |
|---|---|---|---|
| 1-01 | The Man Trap | -33 | |
| 1-02 | Charlie X | 26 | |
| 1-03 | Where No Man Has Gone Before | 34 | |
| 1-04 | The Naked Time | 64 | |
| 1-05 | The Enemy Within | 30 | |
| 1-06 | Mudd's Women | -31 | |
| 1-07 | What Are Little Girls Made Of? | -1 | |
| 1-08 | Miri | -30 | |
| 1-09 | Dagger of the Mind | 8 |