This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
install PostgreSQL 9 in Mac OSX via Homebrew | |
Mac OS X Snow Leopard | |
System Version: Mac OS X 10.6.5 | |
Kernel Version: Darwin 10.5.0 | |
Install notes for PostgreSQL 9.0.1 install using Homebrew: | |
sh-3.2# brew install postgresql |
require 'RMagick' | |
TOP_N = 10 # Number of swatches | |
# Create a 1-row image that has a column for every color in the quantized | |
# image. The columns are sorted decreasing frequency of appearance in the | |
# quantized image. | |
def sort_by_decreasing_frequency(img) | |
hist = img.color_histogram | |
# sort by decreasing frequency |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true
and false
. In Python, for example, they're written as True
and False
. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).
This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.
If you want to use or share this material, please see the license file, below.
# Start by checking if they fixed it upstream: | |
brew update | |
brew upgrade reattach-to-user-namespace | |
# If it says it's already installed, they haven't fixed it upstream. So do this: | |
# Edit the recipe: | |
brew edit reattach-to-user-namespace |
Here is a simple jQuery plugin to make a table header fixed on top of a div when this is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<div class="row fixed-table"> | |
<div class="table-content"> | |
<table class="table table-striped table-fixed-header" id="mytable"> | |
<thead class="header"> | |
<tr> | |
<th>Email Address</th> |
This is my constantly updated CS:GO autoexec config. Changelogs can be found under revisions here
Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg
or take what you want from it and add to your autoexec config!
After the Wild West Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg
# Gemfile | |
gem "puma" | |
# Procfile | |
web: bundle exec puma -p $PORT -e $RACK_ENV -C config/puma.rb | |
# add to config block config/environments/production.rb | |
config.threadsafe! | |
# get rid of NewRelic after_fork code, if you were doing this: |