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
| # create dict from *args | |
| kw = {} | |
| kw.update(dict(zip(func.func_code.co_varnames, args))) |
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
| <?php | |
| $users = someshit($someVar); | |
| ?> | |
| <div class="bla"> | |
| <? foreach ($users as $u) : ?> | |
| <div> | |
| <?= $u['username'] ?> from <?= $u['location'] ?> | |
| <? if (is_band($u['id'])) :?> | |
| <?= $u['profile']['genre'] ?> |
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
| <!-- this whole page opens in facebox --> | |
| <div id="#comments"> | |
| <!-- comments go here --> | |
| <div id="pagination-stuff"> | |
| <a href="/band/comments?page=1">1</a> | |
| <a href="/band/comments?page=2">2</a> | |
| <a href="/band/comments?page=2">3</a> | |
| </div> |
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
| <link href="/pretty/prettify.css" media="all" rel="stylesheet" type="text/css" /> | |
| <script src="/pretty/prettify.js"></script> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| <script> | |
| function zpad(num, padto) { | |
| var asStr = "" + num; | |
| var numDigits = padto - asStr.length; | |
| var str = ""; | |
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
| hdiutil resize -size 2.6g ~/Desktop/my.dmg |
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 { // CF - NOT SUPER | |
| uuid_1 : { | |
| title: some title for the comment, | |
| body: this is the body of the commment, | |
| author: some dude | |
| }, | |
| uuid_2 : { | |
| title: another title, | |
| body: bla bla, | |
| author: joe balls |
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
| public class ModelExample { | |
| public static void main(String[] args) { | |
| ClientManager clientManager = ClientManager.factory(Cassandra.Client.class); | |
| clientManager.addHost("localhost", 9160); | |
| Primitives p = new Primitives(); | |
| p.setSomeBoolean(false); | |
| p.setSomeByte(Byte.MAX_VALUE); | |
| p.setSomeChar('a'); | |
| p.setSomeDouble(Double.MAX_VALUE); |
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
| YELLOW="\[\033[1;33m\]" | |
| PINK="\[\e[1;35m\]" | |
| GREEN="\[\e[1;32m\]" | |
| BLUE="\[\e[1;36m\]" | |
| PLAIN="\[\e[m\]" | |
| BLACK="\[\e[1;30m\]" | |
| export LSCOLORS="Exfxcxdxbxegedabagacad" | |
| alias ls="ls -G" |
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 parse_git_branch { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
| } | |
| YELLOW="\[\033[1;33m\]" | |
| export PS1="\[\e[36;1m\]\u@\[\e[32;1m\]\H\e[0m:\[\e[0m\]\e[35;1m\w\e[0m $YELLOW\$(parse_git_branch)\[\e[0m\]$ \[\e[0m\]" |
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
| sudo sysctl -w net.inet.tcp.delayed_ack=0 |