Skip to content

Instantly share code, notes, and snippets.

View sintaxi's full-sized avatar
🔥
GSD

Brock Whitten sintaxi

🔥
GSD
View GitHub Profile
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
@sintaxi
sintaxi / gist:4a2ba0ee6d843748cd5d
Created June 24, 2015 20:20
compile harp project using NodeJS
var harp = require("harp")
harp.compile("source", "www", function(errors, output){
console.log(output)
})
var m = React.createElement
var Header = React.createClass({
role: 'Header',
render: function(){
return m("header", { role:"banner" },
m("div", { id: "cd-logo" },
m("a", {},
m("img", { src: "img/cd-logo.svg", alt: "Logo" })
class String
def title_case!
self.split.map{ |w| w.capitalize }.join(' ')
end
end
class Hash
def title_case_keys!
self.each_pair do |k,v|
module StateMachine
def self.included(klass)
klass.extend ClassMethods
end
def self.wrap_method(klass, name)
original_method = "original_#{name}"
before_method = "before_#{name}"
@sintaxi
sintaxi / gist:32194
Created December 5, 2008 01:32
undefined
set :application, "phonegap"
set :deploy_to, "/var/www/phonegap.com"
set :tmp, "#{application}_update"
set :app_root, "/"
set :user, "root"
set :use_sudo, true
role :web, "phonegap.com"
require 'rubygems'
require "hpricot"
PHONEGAP_WEB_PATH = "iphone/www"
namespace :iphone do
task :default => [:import] do
end
desc 'reverts file back to original form'
#######################
# Merb.run_later issues
#######################
Here is what I am running.
- Slicehost account
- Ubuntu 8.04
- jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996) [amd64-java]
- glassfish V3 (0.9.1)
@sintaxi
sintaxi / index.html
Created February 5, 2009 20:03
xhr request to flickr using XUI
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Page Title</title>
<script type="text/javascript" charset="utf-8">
//paste XUI here
getImage = function(){
x$("#imagebox").xhr("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?",
{callback:function(){
#
# #####################################
# Who is the killer?
# #####################################
#
# Handel has been killed and Beethoven is on the case. He has
# interviewed the four suspects and their statements are shown below.
# Each suspect has said two sentences. One sentence of each suspect is a
# lie and one sentence is the truth. Help Beethoven figure out who the
# killer is.