Skip to content

Instantly share code, notes, and snippets.

Avatar
🚧
WIP

Bayu Aldi Yansyah pyk

🚧
WIP
View GitHub Profile
@pyk
pyk / namepace.rb
Last active Dec 19, 2015
namespace doesn't use layout engine that set globally!
View namepace.rb
# configure block
configure do
set :views , "assets"
set :erb , :layout => :"views/layout"
enable :sessions
end
.
.
.
View meta-tags.md

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 Dec 20, 2015
my git config
View .gitconfig
[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 Apr 29, 2016
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.
View jade.sublime-build
{
"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 Jul 29, 2013
sublime build [Errno 2] No such file or directory for LESS. already fixed. see on https://gist.github.com/peeyek/6108287 for jade
View less.sublime-build
{
"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 Aug 2, 2013
Custom jshint option on sublime linter. remove warn on comma first coding style
View SublimeLinter.sublime-settings
{
"jshint_options":
{
// remove warning on comma first coding style
"laxcomma":true
}
}
View aksesmySql.js
$hasil = mysql_query("SELECT * FROM TabelAnggota");
print_r($hasil);
View examplemodulefs.js
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 Aug 20, 2013
my Makefile .
View 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 && \
View setup ruby development environment on ubuntu 12.04.md

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
You can’t perform that action at this time.