Skip to content

Instantly share code, notes, and snippets.

View pyk's full-sized avatar
🐈‍⬛
I may be slow to respond.

pyk pyk

🐈‍⬛
I may be slow to respond.
View GitHub Profile
@pyk
pyk / namepace.rb
Last active December 19, 2015 09:49
namespace doesn't use layout engine that set globally!
# configure block
configure do
set :views , "assets"
set :erb , :layout => :"views/layout"
enable :sessions
end
.
.
.

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@pyk
pyk / .gitconfig
Last active December 20, 2015 08:39
my git config
[core]
excludesfile = /Users/bayu/.gitignore
quotepath = false
editor = sublime -n -w
[user]
name = Bayu Aldi Yansyah
email = Bayualdiyansyah@gmail.com
[mergetool]
@pyk
pyk / jade.sublime-build
Last active April 29, 2016 10:58
i have problem sublime build [Errno 2] No such file or directory . then i fix with this code. make sure you install node and jade with npm globally. press cmd + b to convert .jade to html. this build also asume that you place your jade file to directory called jade. the html output will be outside jade folder.
{
"cmd": ["jade", "$file", "-o", "../", "--pretty"],
"selector": "source.jade",
"path": "/usr/local/bin"
}
# path is where your jade executable.
# type in terminal :
# $ which jade
# and change into "path" value into your location.
@pyk
pyk / less.sublime-build
Created July 29, 2013 22:47
sublime build [Errno 2] No such file or directory for LESS. already fixed. see on https://gist.github.com/peeyek/6108287 for jade
{
"cmd": ["lessc", "--compress", "$file", "../$file_base_name.css"],
"selector": "source.jade",
"path": "/usr/local/bin"
}
# path is where your jade executable.
# type in terminal :
# $ which jade
# and change into "path" value into your location.
@pyk
pyk / SublimeLinter.sublime-settings
Created August 2, 2013 22:24
Custom jshint option on sublime linter. remove warn on comma first coding style
{
"jshint_options":
{
// remove warning on comma first coding style
"laxcomma":true
}
}
$hasil = mysql_query("SELECT * FROM TabelAnggota");
print_r($hasil);
var fs = require('fs');
fs.readFile('./resource.json',function(err, data){
if(err) throw err;
console.log(JSON.parse(data));
});
console.log('Selanjutnya...');
@pyk
pyk / Makefile
Created August 20, 2013 00:13
my Makefile .
TESTS = test/*/*.js
REPORTER = spec
test:
@NODE_ENV=test ./node_modules/.bin/mocha \
--require should \
--reporter $(REPORTER) \
$(TESTS)
test-docs:
mkdir docs && touch docs/test.html && \

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev