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
{ | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"font_options": "subpixel_antialias", | |
"font_size": 14, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage", | |
"Markdown" |
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
# Original: http://stackoverflow.com/questions/10859966/how-to-convert-all-tables-in-database-to-one-collation | |
SELECT CONCAT("ALTER TABLE ", TABLE_NAME," COLLATE <COLLATION_VALUE>") AS ExecuteTheString | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA="<SCHEMA_NAME>" | |
AND TABLE_TYPE="BASE TABLE"; | |
# Execute selected scripts. |
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/ruby | |
require 'www/delicious' | |
require 'nokogiri' | |
require 'cgi' | |
module WWW | |
class Delicious | |
class Post < Element |
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
--- r8101_n.c 2013-10-22 11:46:05.822536955 -0700 | |
+++ r8101_n_new.c 2013-10-22 11:44:55.134534000 -0700 | |
@@ -1904,6 +1904,9 @@ | |
rtl8101_rx_hwaccel_skb(skb, tp->vlgrp, swab16(opts2 & 0xffff)); | |
ret = 0; | |
} | |
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) | |
+ if (opts2 & RxVlanTag) | |
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff)); | |
#else |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
"font_size": 10, | |
"git_gutter_live_mode": false, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, |
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
class API < Grape::API | |
version 'v1', :using => :header, :vendor => 'onescreen', :format => :json | |
get 'hello' do | |
{:hello => 'world'} | |
end | |
# include Behavior |
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
# Is the semantic specifier on the id or name attribute of the div? | |
# If id then | |
$('#semantic').html('<p><%= @country.abstract.value %></p><p><%= @country.comment.value%></p><p>Currency: <%@country.currency.value%></p><p>Population: <%[email protected]%></p><p>Capital: <%[email protected]%></p>'); | |
# If name then | |
$('.semantic').html('<p><%= @country.abstract.value %></p><p><%= @country.comment.value%></p><p>Currency: <%@country.currency.value%></p><p>Population: <%[email protected]%></p><p>Capital: <%[email protected]%></p>'); |
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
ruby-1.9.2-p0 > sub_end.strftime("Ends on %m/%d/%Y at %I:%M%p") | |
NoMethodError: undefined method `strftime' for 1315186557:Fixnum | |
from (irb):12 | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands/console.rb:44:in `start' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands/console.rb:8:in `start' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands.rb:23:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>' | |
ruby-1.9.2-p0 > sub_end | |
=> 1315186557 |
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
# Namespace test. | |
module A | |
class B | |
class C | |
end | |
end | |
end | |
module A | |
class D |
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 'rspec/core/rake_task' | |
# Make tasks (originally from curb) ----------------------------------------------------- | |
MAKECMD = ENV['MAKE_CMD'] || 'make' | |
MAKEOPTS = ENV['MAKE_OPTS'] || '' | |
FFMPEG_SO = "ext/FFMPEG_core.#{Config::MAKEFILE_CONFIG['DLEXT']}" | |
file 'ext/Makefile' => 'ext/extconf.rb' do |