Skip to content

Instantly share code, notes, and snippets.

View stoyanvi's full-sized avatar

Stoyan Ivanov stoyanvi

  • Sofia, Bulgaria
View GitHub Profile
@stoyanvi
stoyanvi / README.md
Last active August 29, 2015 14:10 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

function toBeProfiled(){
console.log(new Error('Show me the stack!'));
//Do something here
}
function launchApp(){
function doThing(){
console.debug(toBeProfiled);
toBeProfiled();
@stoyanvi
stoyanvi / vote.js
Last active August 29, 2015 14:08 — forked from FGRibreau/vote.js
/**
* How to automatically vote on VoicePolls -__- #ScriptKiddieLevel
*
* Guys, you should really check — at least — for IPs and — at least — put a rate-limit on API calls.
*
* Usage :
* $ npm install async request
* $ node vote.js
*/
// First configure $animateProvider
angular.module('MyApp', ['ngAnimate']).config(['$animateProvider', function($animateProvider){
// restrict animation to elements with the bi-animate css class with a regexp.
// note: "bi-*" is our css namespace at @Bringr.
$animateProvider.classNameFilter(/bi-animate/);
}]);
#!/bin/bash
SCRIPTPATH=`git rev-parse --show-toplevel`"/.git/hooks"
HOOKS="${SCRIPTPATH}/pre-commit-*"
shopt -s nullglob
pass=true
for hook in $HOOKS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
git config --global mergetool.sublime.cmd "subl -w \$MERGED"
git config --global mergetool.sublime.trustExitCode false
git config --global merge.tool sublime
git mergetool -y
@stoyanvi
stoyanvi / 0_reuse_code.js
Created April 4, 2014 11:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
// This code will only work if you use Sass 3.3 (or higher)
// Configuration :
// -----------------------------------------
$screensizes : (
'default' : 0 infinity,
'mobile' : 0 767px,
'phone' : 0 480px,
'tablet' : 481px 767px,