Gist is a nice service. We can write code so easily and manage files as repository.
But bad points are …
- Many repository
- Gist destributes random hash to perticular gists (repositories).
- So difficult to find or remember contents as repository.
# https://gist.github.com/marcinantkiewicz/9ac20677145f246eb01cd1759cb03f35 | |
# Author: Marcin Antkiewicz | |
# [email protected] | |
# @deciban | |
# Use: | |
#find_chrome_extensions -OutputDir "c:\" | |
#idea ref: https://www.reddit.com/r/PowerShell/comments/5px71w/getting_chrome_extensions/ | |
#PS 2.o has no convertfrom-json, 2.0 helper from http://stackoverflow.com/questions/28077854/powershell-2-0-convertfrom-json-and-convertto-json-implementation |
function listFilesInFolder() { | |
var folder = DocsList.getFolder("Maudesley Debates"); | |
var contents = folder.getFiles(); | |
var file; | |
var data; | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
sheet.clear(); | |
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |
""" | |
JsonStream by Gareth George | |
LICENSE: The do whatever the heck you want with it license. | |
Do what you want with it, when you want to do it. I take no responsibility for any damages that may occur in the usage of this script. This means no guaranties as to its reliability or stability. | |
USAGE: | |
file = open_stream('filename.json', 'rb') # opens the file with the given file name to be read as a json stream | |
file = open_stream('filename.json.gz', 'rb') # opens the COMPRESSED file with the file name to be read as a json stream |
# Bash completion for Homebrew cask uninstall | |
_brew_cask_update_complete() { | |
local cur prev opts | |
COMPREPLY=() | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
opts=$(brew cask outdated | cut -c 1-) | |
COMPREPLY=( $(compgen -W "$opts" -- $cur) ) | |
} | |
complete -o nospace -F _brew_cask_update_complete bcup |
# first: mkdir user && cd user && cp /path/to/get_gists.py . | |
# python3 get_gists.py user | |
import requests | |
import sys | |
from subprocess import call | |
user = sys.argv[1] | |
r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
Gist is a nice service. We can write code so easily and manage files as repository.
But bad points are …
cd ~/git/foo | |
git init | |
git remote add origin [email protected]:yourname/foo.git | |
git fetch | |
git branch master origin/master | |
git checkout master | |
git add -A | |
git commit -m 'first commit' | |
git push |
This is a script to export bookmarks from the web browser Google Chrome to a users home drive in a Windows environment with clients and domain controllers. Most of the script comes from this article