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
$(function() { | |
$('#add_new').click(function() { | |
TopUp.display($('#topup_div'), | |
{type: 'dom', title: 'New Todo', | |
overlayClose: 1, resizable: 0, shaded: 1}); | |
}); | |
$('#topup_frm').submit(function() { | |
$.post(this.action, $(this).serialize(), null, "script"); | |
return false; | |
}); |
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
###### Usage ####### | |
# | |
# | |
# rails blog -m http://gist.github.com/raw_path | |
# | |
# | |
################### | |
############## generate commands ################# |
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
<? echo "Hello World!" ?> |
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
/** @jsx React.DOM */ | |
var App = React.createClass({displayName: 'App', | |
getInitialState: function(){ | |
return {html: "this is <em>an</em> <strong>example</strong>"}; | |
}, | |
render: function(){ | |
var handleChange = function(event){ | |
this.setState({html: event.target.value}); | |
}.bind(this); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
</body> |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'rack', github: 'rack/rack' | |
gem 'i18n', github: 'svenfuchs/i18n' | |
gem 'sqlite3' | |
GEMFILE |
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
private void processAllHiddenTags(StringBuilder sbXMLString, ASMStudent student) | |
{ | |
if (((sbXMLString.ToString().IndexOf("<w:body>") >= 0) && (sbXMLString.ToString().IndexOf("<w:body>") <= sbXMLString.Length)) && | |
((((sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9) >= 0) && | |
(((sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9) <= sbXMLString.Length))) | |
{ | |
pageText = sbXMLString.ToString().Substring(sbXMLString.ToString().IndexOf("<w:body>"), (sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9).ToString().Trim(); | |
// | |
// more madness follows! |
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 | |
link="http://epaper3.esakal.com/%s/Enlarge/PuneCity/Pune1Today/page%s.htm" | |
html_file7="/var/log/esakal.htm7" | |
html_file8="/var/log/esakal.htm8" | |
url="" | |
# cf. "Editing files with the ed text editor from scripts.", | |
# http://wiki.bash-hackers.org/doku.php?id=howto:edit-ed |
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
#define HC_DATA_H digitalWrite(data, HIGH) // data line output high | |
#define HC_DATA_L digitalWrite(data, LOW) //date line output low | |
#define HC_RCK_H digitalWrite(rck, HIGH) // rck output high | |
#define HC_RCK_L digitalWrite(rck, LOW) // rck output low | |
#define HC_SCK_H digitalWrite(sck, HIGH) // sck output high | |
#define HC_SCK_L digitalWrite(sck, LOW) // sck output low | |
unsigned char LED_BCD[16] ={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e }; //common anode digital tube BCD code |
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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
# Activate the gem you are reporting the issue against. |
OlderNewer