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 ls --description 'List contents of directory' | |
| command ls -lFG $argv | |
| end | |
| function subl --description 'Launches sublime text in a new window' | |
| command subl -n $argv | |
| end | |
| function code --description 'Launches visual code studio in a new window' | |
| command code -n $argv |
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
| iex> use PipeInspect | |
| nil | |
| iex> "hello" |> String.reverse |> String.upcase |> String.downcase | |
| "olleh" | |
| "OLLEH" | |
| "olleh" |
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
| import numpy as np | |
| import pandas as pd | |
| from pandas import DataFrame, Series | |
| pd.set_option("display.max_rows", 100) | |
| pd.set_option("display.max_columns", 400) |
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
| /** | |
| * Parses mixed type values into booleans. This is the same function as filter_var in PHP using boolean validation | |
| * @param {Mixed} value | |
| * @param {Boolean} nullOnFailure = false | |
| * @return {Boolean|Null} | |
| */ | |
| var parseBooleanStyle = function(value, nullOnFailure = false){ | |
| switch(value){ | |
| case true: | |
| case '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
| #!/bin/sh -e | |
| ##!! PLEASE USE THIS SCRIPT WITH CAUTION - AND AT YOUR OWN RISK !!## | |
| ##!! IT HAS BEEN KNOWN TO CAUSE RESETS AND WIPE DATA ON SOME CHROMEBOXES !!## | |
| APPLICATION="${0##*/}" | |
| ANSWER='' | |
| SUDO='' | |
| USAGE=" | |
| $APPLICATION [no options] |
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
| # ~/.config/fish/config.fish | |
| . ~/.config/fish/fish_prompt.fish | |
| set fish_greeting '' # turn off greeting | |
| function fish_title;end | |
| alias vi 'vim' |
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
| # http://stackoverflow.com/questions/748324/python-convert-those-tinyurl-bit-ly-tinyurl-ow-ly-to-full-urls | |
| ############# | |
| # urllib2 | |
| import urllib2 | |
| fp = urllib2.urlopen('http://bit.ly/rgCbf') | |
| fp.geturl() | |
| # ==> 'http://webdesignledger.com/freebies/the-best-social-media-icons-all-in-one-place' |
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
| % Copyright (c) 2010-2014, Lars Buitinck | |
| % May be used, redistributed and modified under the terms of the | |
| % GNU Lesser General Public License (LGPL), version 2.1 or later | |
| % Heaps/priority queues in Erlang | |
| % Heaps are data structures that return the entries inserted into them in | |
| % sorted order. This makes them the data structure of choice for implementing | |
| % priority queues, a central element of algorithms such as best-first/A* | |
| % search and Kruskal's minimum-spanning-tree algorithm. |

