This file contains hidden or 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
def create_master model_class, &block | |
return unless block_given? | |
csv = "#{Rails.root}/db/masters/#{model_class.name.split('::').last.underscore}.csv" | |
model_class.destroy_all | |
model_class.create! CSV.open(csv).map(&block) | |
end | |
def import_master_unsafe model_class, &block | |
return unless block_given? |
This file contains hidden or 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
source "https://rubygems.org" | |
gem "sinatra" | |
gem "puma" |
This file contains hidden or 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
diff --git a/mail.php b/mail.php | |
index fbc1b00..2677337 100644 | |
--- a/mail.php | |
+++ b/mail.php | |
@@ -7,9 +7,10 @@ while (!file_exists($wp_include) && $i++ < 10) { | |
} | |
require($wp_include); | |
- $name = iconv("UTF-8", "ISO-8859-2", $_POST['name']); | |
- $email = iconv("UTF-8", "ISO-8859-2", $_POST['email']); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.stockrobot" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="8" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
This file contains hidden or 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
RM := rm -vf | |
TARGET := $(shell find . -type f -not -name "*.rs" -and -not -name "Makefile" -and -not -name ".git") | |
all: | |
@echo "Nothing to be done here" | |
%/run: %.rs | |
rustc $*.rs | |
./$* |
This file contains hidden or 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 class="intro-hapham"> | |
<img class="img-intro" src="<?php echo bloginfo("template_directory"). get_post_meta($post->ID,"thumbnail_big",true) ?>" border="0" alt="<?php the_title() ?>" /> | |
<div class="text-intro"> | |
<h1 class="title-intro"><?php the_title() ?></h1> | |
<div class="bor-gra" style="width: 930px; margin:0px auto; height: 1px; background: #999999; "></div> | |
<div class="cont-intro"> | |
<div class="cols"> | |
<?php the_content(" ") ;?> |
This file contains hidden or 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
http://www.linuxquestions.org/questions/linux-desktop-74/awesome-wm-3-4-1-help-810852/ | |
audience unsettings jupiter oracle-java7-installer fuse-exfat awesome awesome-extra | |
ctags vim-gtk git-core | |
repos: | |
ppa:audience-members/ppa | |
ppa:diesch/testing |
This file contains hidden or 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
" UtilSnips | |
" The <tab> key works as follow | |
" - if there is popup: <c-n> (next popup item) | |
" - if there is something behind cursor | |
" - try expand snippet | |
" - if can't expand, try jump | |
" - finally try <c-n> (key word completion) | |
" The <s-tab>: | |
" - if there is popup: <c-p> (previous popup item) | |
" - try jump back |
This file contains hidden or 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
// ==UserScript== | |
// @match http://twitter.com/* | |
// @match http://www.twitter.com/* | |
// @match https://twitter.com/* | |
// @match https://www.twitter.com/* | |
// ==/UserScript== | |
/*! | |
* Name: Twitter Quick View | |
* URL: http://tungdao.com | |
* Description: Add `v` keyboard shortcut to open the first link in a tweet |
This file contains hidden or 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
/** | |
* Mootool Popup | |
* @author Tung Dao <[email protected]> | |
*/ | |
;(function(exports) { | |
var Popup = new Class({ | |
initialize: function(selector) { | |
this.elements = $$(selector); |