Skip to content

Instantly share code, notes, and snippets.

View Aeon's full-sized avatar
🦴

Anton Stroganov Aeon

🦴
View GitHub Profile
@IamAdiSri
IamAdiSri / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Last active May 9, 2022 22:08 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@hadees
hadees / arel_helpers.rb
Created March 5, 2016 05:41
Arel Helpers
module ArelHelpers
extend self
def self.included(base)
base.extend self
end
def asterisk(arel_table_or_model)
arel_table, columns = case arel_table_or_model
when Arel::Table
@Stuk
Stuk / promise-debug.js
Last active October 2, 2016 21:39
I've found this code useful for debugging promises, to find what order things are happening in. `console.error` gives a stack trace in the Webkit Developer Tools which makes easily narrow down where the promise creation and resolution is happening.
var Q = require("q");
var Set = require("collections/set"); // https://npmjs.org/package/collections
window.outstandingPromises = new Set();
var originalDefer = Q.defer;
Q.defer = function () {
console.error("Deferred created");
var deferred = originalDefer();
deferred.stack = new Error("").stack;
window.outstandingPromises.add(deferred);
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@snikch
snikch / resque.rake
Created April 12, 2012 21:46 — forked from kenmazaika/Console Output
Start and Stop tasks for resque workers the intelligent way, forking the process for speed and reduced load.
require 'resque/tasks'
namespace :resque do
task :setup => :environment
# From https://gist.github.com/1870642
desc "Restart running workers"
task :restart_workers => :environment do
Rake::Task['resque:stop_workers'].invoke
Rake::Task['resque:start_workers'].invoke
end