This file contains 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
query SearchMostTop10Star($queryString: String!, $number_of_repos:Int!) { | |
search(query: $queryString, type: REPOSITORY, first: $number_of_repos) { | |
repositoryCount | |
edges { | |
node { | |
... on Repository { | |
name | |
url | |
description | |
stargazers {totalCount} |
This file contains 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
{ | |
viewer { | |
repositories(first: 10) { | |
totalCount | |
nodes { | |
name | |
url | |
nameWithOwner | |
} |
This file contains 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
curl \ | |
-H "Authorization: token TOKEN" \ | |
-X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/github/service-catalog-demo/deployments \ | |
-d '{"ref":"master", "environment":"amy-dev-svr"}' |
This file contains 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
curl -H "Authorization: token TOKEN" \ | |
-H 'Accept: application/vnd.github.v3+json' \ | |
"https://api.github.com/repos/github/service-catalog-demo/dispatches" \ | |
-d '{"event_type": "trigger", "client_payload": {"filename": "2020-08-11-foo123", "title": "Hi Mom", "status": "Major outage"}}' |
This file contains 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
import sys | |
import math | |
def inch_to_ft_inch(inches): | |
ft = math.floor(int(inches)/12) | |
ret_inch = int(inches) % 12 | |
return ft, ret_inch | |
val = inch_to_ft_inch(sys.argv[1]) | |
print("{}\' {}\"".format(int(val[0]), val[1])) |
This file contains 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
# Renames all the files in a directory with the root filename | |
# To run this: | |
# $ python pymv.py MyFileNameRoot | |
# > Renaming: Screen Shot 2020-04-23 at 10.07.21 AM.png => flare0.png | |
import os | |
import sys | |
# Function to rename multiple files | |
def main(): |
This file contains 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
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | |
# dependencies | |
/node_modules | |
/.pnp | |
.pnp.js | |
# testing | |
/coverage |
This file contains 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
git push origin `git subtree split --prefix public master`:gh-pages --force |
This file contains 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
# usage - run: | |
# python getTitle.py URL | |
from urllib2 import urlopen | |
import sched, time | |
from time import gmtime, strftime | |
import lxml.html | |
import sys | |
url = sys.argv[1] |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am edwindotcom on github. | |
* I am edwindotcom (https://keybase.io/edwindotcom) on keybase. | |
* I have a public key ASB7cNwde-yx-Syxd1bYlQIB3jibATDBLhPGuQ0UUHOiiQo | |
To claim this, I am signing this object: |
NewerOlder