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
query IntrospectionQuery { | |
__schema { | |
queryType { name } | |
mutationType { name } | |
subscriptionType { name } | |
types { | |
...FullType | |
} | |
directives { |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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 merge(a, b, c) { | |
c = c || []; | |
if(!a.length && !b.length) return c; | |
c.push(a[0] < b[0] || isNaN(b[0]) ? a.shift() : b.shift()); | |
return merge(a, b, c); | |
} | |
function msort(inp) { | |
var mid = (inp.length / 2) << 0; |
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
# Find and replace text in multiple files | |
# http://www.24hourapps.com/2009/03/linux-tips-17-find-and-replace-text-in.html | |
# Multiple file find and replace is a rarely used, but an extremely time saving, ability of | |
# Linux that I cannot live without. It can be achieved by chaining a few commands together | |
# to get the list of files you want to change (find), make sure the files contain the strings | |
# you want to replace (grep), and do the replacements (sed). | |
# Lets say we have a lot of code that uses the function registerUser that was implemented when | |
# there was only one class of users, but now another class of users need to access the system |
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
# Rename multiple files | |
# http://www.24hourapps.com/2009/03/linux-tips-10-rename-multiple-files.html | |
# Renaming multiple files in Linux is surprisingly difficult given the simplistic power | |
# provided by many other system commands. Unlike DOS, which provided a rename command that | |
# allowed wild cards, Linux's rename/mv command is less versatile. Therefore to rename files one needs to write a loop. Luckily bash helps a lot here. | |
# Lets say we have in our directory a number of .txt files that we need to rename to .nfo. | |
# To do this we would need to use the command: |