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
# https://www.ditig.com/256-colors-cheat-sheet | |
local OMZ_THEME_FRUIT_COLOR=161 | |
local OMZ_THEME_LEAF_COLOR=77 | |
local OMZ_THEME_GIT_LOGO_THEME_COLOR=202 | |
local OMZ_THEME_PROMPT_STRING_COLOR=12 | |
local OMZ_THEME_BACKGROUND_COLOR=236 | |
local OMZ_THEME_NEWLINE=$'\n' | |
[[ "$USERNAME" == 'root' ]] && OMZ_THEME_PROMPT_STRING_COLOR=9 |
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
#include <sys/socket.h> | |
#include <sys/un.h> | |
#include <sys/event.h> | |
#include <netdb.h> | |
#include <assert.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <errno.h> |
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
# oh-my-zsh Theme | |
# Default robbyrussell theme with node version info. | |
# Installation: place this file in .oh-my-zsh/custom/themes/robbyrussell.zsh_theme | |
function node_prompt_version { | |
if which node &> /dev/null; then | |
echo "%{$fg_bold[blue]%}node(%{$fg[red]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}" | |
fi | |
} |
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
javascript:(function(){var styles = document.querySelectorAll('link[rel=\'stylesheet\']'); for (var s = 0; s < styles.length; s++) {styles[s].mediax = styles[s].media;if (styles[s].media === 'only x') { styles[s].media = styles[s].mediax; } else if (styles[s].media !== 'print') {styles[s].media = 'only x';}}})(); |
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
#!/bin/bash | |
# Usage: ./gen.sh collected-stacks.txt | |
TMPSTACKS=/tmp/flamegraph-stacks-collapsed.txt | |
TMPPALETTE=/tmp/flamegraph-palette.map | |
./stackcollapse-jstack.pl $1 > $TMPSTACKS | |
# 1st run - hot: default |
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
/** | |
* Page layout, reused across multiple Page components | |
* @jsx React.DOM | |
*/ | |
var React = require('react'); | |
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment'); | |
var Navigation = require('../components/Navigation.jsx'); | |
var DefaultLayout = React.createClass({ |
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
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
sudo yum install -y apache-maven | |
mvn --version |
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
app.directive('asyncAnchor', [ | |
'$location', | |
'$anchorScroll', | |
'$timeout', | |
function($location, $anchorScroll, $timeout){ | |
return { | |
link: function(scope, element, attributes){ | |
var id = attributes.asyncAnchor || attributes.id || attributes.name; | |
var delay = attributes.asyncAnchorDelay; |
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
<div> | |
<a href="{{protocol}}//{{host}}{{pathname}}">{{protocol}}//{{host}}{{pathname}}</a> | |
</div> | |
<script> | |
function Template(node) { | |
var prototype = document.createDocumentFragment(); | |
prototype.appendChild(node); |
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
require 'rubygems' | |
require 'mechanize' | |
if ARGV.size < 3 | |
puts %q{Usage: ruby xcode.rb USERNAME PASSWORD "DOWNLOAD_URL" [WGET_PARAMS]} | |
puts %q{Example: ruby xcode.rb [email protected] 123456 "https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg" } | |
exit | |
end | |
a = Mechanize.new { |agent| |
NewerOlder