Skip to content

Instantly share code, notes, and snippets.

View nobuti's full-sized avatar
Stop me

Buti nobuti

Stop me
View GitHub Profile
.arc path {
stroke: #F8F8F8;
stroke-width: 4px;
}
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BorderZero:
@nobuti
nobuti / server
Created September 29, 2015 09:33
Browser-sync + Rails 4.2 (without tearing out the asset pipeline) So far so good
#!/usr/bin/env bash
set -e
rails s webrick & sleep 3
browser-sync start --files "app/views/**/*.erb, app/assets/stylesheets/**/*.scss, app/assets/javascripts/**/*.js" --proxy "localhost:3000" --reload-delay 1000 --no-open
@nobuti
nobuti / gist:3496483
Created August 28, 2012 09:21
Bash profile
# enable git unstaged indicators - set to a non-empty value
GIT_PS1_SHOWDIRTYSTATE="."
# enable showing of untracked files - set to a non-empty value
GIT_PS1_SHOWUNTRACKEDFILES="."
# enable stash checking - set to a non-empty value
GIT_PS1_SHOWSTASHSTATE="."
# enable showing of HEAD vs its upstream
@nobuti
nobuti / load.js
Created September 5, 2012 08:47 — forked from judofyr/load.js
function loadScript(path, fn) {
var el = document.createElement('script'),
loaded = 0,
onreadystatechange = 'onreadystatechange',
readyState = 'readyState';
el.onload = el.onerror = el[onreadystatechange] = function () {
if (loaded || (el[readyState] && !(/^c|loade/.test(el[readyState])))) return;
el.onload = el.onerror = el[onreadystatechange] = null;
loaded = 1;
@nobuti
nobuti / gist:3652427
Created September 6, 2012 07:12
Node.js hello world
var http = require('http');
http.createServer(function(req, res){
res.writeHead(200,{'Content-Type':'text/plain'});
res.end('Hello world');
}).listen(8080, '127.0.0.1');
console.log("Node server running at http://localhost:8080");
@nobuti
nobuti / gist:3717748
Created September 13, 2012 21:18
Sublime text command line
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
/* normal flexbox */
.flexbox .flex-container {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
}
.flexbox .flex-container.vertical {
display: -webkit-flex;
display: -moz-flex;
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: image-url($image);
background-size: $width $height;
}