Skip to content

Instantly share code, notes, and snippets.

View ivan4th's full-sized avatar

Ivan Shvedunov ivan4th

  • Spacemesh
  • Yerevan, Armenia
  • 17:44 (UTC +04:00)
View GitHub Profile
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@dvessel
dvessel / README.mdown
Last active May 15, 2020 13:18
Sass+Compass, Guard, LiveReload

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.

Instructions

@winhamwr
winhamwr / awesome_task.py
Created May 17, 2012 16:02
Celery base task that adds some niceties for longish-running or singleton jobs.
"""
Celery base task aimed at longish-running jobs that return a result.
``AwesomeResultTask`` adds thundering herd avoidance, result caching, progress
reporting, error fallback and JSON encoding of results.
"""
from __future__ import division
import logging
import simplejson
@agaviria
agaviria / Ledger_3_commands.dat
Created August 10, 2012 20:03
Collection of ledger-cli commands
# comments example for .dat or .ledger files
@smallexample
; This is a single line comment,
# and this,
% and this,
| and this,
* and this.
# If you have a deeply nested tree of accounts,
# it may be convenient to define an alias, for example:
@jayj
jayj / flexbox.less
Last active November 20, 2023 04:51
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@vsajip
vsajip / pyvenvex.py
Last active May 18, 2024 23:13
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@felixvisee
felixvisee / example.js
Created July 4, 2013 16:00
Jasmine promise-returning spec wrapper function, example with https://github.com/slightlyoff/Promises
describe("Something", function () {
it("should promise", promising(function () {
return Promise.reject("Ouch!");
}));
});
@grvhi
grvhi / twbs-btn-gradients
Last active October 21, 2022 22:24
A simple CSS overwrite to add old-style gradients to Bootstrap 3 flat buttons. CSS created from http://twitterbootstrap3buttons.w3masters.nl
.btn-primary {
background-color: #08c;
border-color: #08c;
color: #fff;
background-color: #007ab8;
background-image: -moz-linear-gradient(top, #08c, #006699);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#006699));
background-image: -webkit-linear-gradient(top, #08c, #006699);
background-image: -o-linear-gradient(top, #08c, #006699);
background-image: linear-gradient(to bottom, #08c, #006699);
@Apsu
Apsu / interfaces.py
Created November 11, 2013 16:22
WIP Ansible /etc/network/interfaces module
#!/usr/bin/python
import os
import json
def update(module, state, name, auto, hotplug, iface_type, addr_family, address,
netmask, nameservers, gateway):
try:
fd = open('/etc/network/interfaces')