Skip to content

Instantly share code, notes, and snippets.

@akx
akx / gist:ff2c39eb8615208a7b1f90520951c4bd
Created June 15, 2017 13:28
Dependency loops in npm
[('1615-node-2017', '1615-node-001'), ('1615-node-001', '1615-node-2017')]
[('Accessor', 'Accessor_Singleton'), ('Accessor_Singleton', 'Accessor')]
[('aglio-theme-api', 'aglio-fork'), ('aglio-fork', 'aglio-theme-api')]
[('alicemodule01', 'alicemodule01')]
[('ameya-shukla', 'ameya-shukla')]
[('animate-css-styled-components', 'animate-css-styled-components')]
[('arc-check', 'arc-object'), ('arc-object', 'arc-check')]
[('art-build-configurator', 'art-build-configurator')]
[('art-build-configurator', 'art-class-system'), ('art-class-system', 'art-build-configurator')]
[('art-build-configurator', 'art-config'), ('art-config', 'art-build-configurator')]
@vancluever
vancluever / gnome-tracker-disable.md
Last active November 13, 2024 18:26
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@anupdugar
anupdugar / OauthClient.php
Created January 12, 2015 07:11
Scripts to demo Magento 2 Oauth1.a token exchange
<?php
use OAuth\Common\Consumer\Credentials;
use OAuth\Common\Http\Client\ClientInterface;
use OAuth\Common\Http\Exception\TokenResponseException;
use OAuth\Common\Http\Uri\Uri;
use OAuth\Common\Http\Uri\UriInterface;
use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\OAuth1\Service\AbstractService;
use OAuth\OAuth1\Signature\SignatureInterface;
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@matsumotory
matsumotory / bench.rb
Last active August 29, 2015 13:58
mruby-redis vs mruby-vedis vs mruby-memcached vs Hash refs: http://blog.matsumoto-r.jp/?p=4071
class SimpleBenchmark
def initialize width = 0
@width = width
end
def measure label
start = Time.now
yield if block_given?
passed = Time.now - start
puts "#{make_fixed_label(label)}passed time #{passed} sec"
end
# Here's the script I'll use to demonstrate - it just loops forever:
$ cat test.rb
#!/usr/bin/env ruby
loop do
sleep 1
end
# Now, I'll start the script in the background, and redirect stdout and stderr
/*
Older email clients and (some) webmail clients (Gmail!) will apply
this rule. Some clients (like older Lotus Notes) don't
support background-color on links, so I didn't want white
links on a white background.
*/
a.button {
background-color: #FFFFFF;
color: #d9286b;
}
@carsonreinke
carsonreinke / resque-pause-workers.sh
Created May 18, 2012 15:01
Pause Resque Workers
pkill -12 -f '^resque-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+: (Forked)|(Waiting for)'
pkill -18 -f '^resque-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+: (Forked)|(Paused)'
@chad
chad / exporter.rb
Created February 26, 2012 18:57 — forked from jcasimir/exporter.rb
Export ActiveRecord Tables to CSV
require 'csv'
module Exporter
DEFAULT_EXPORT_TABLES = [ Invoice, InvoiceItem, Item, Merchant, Transaction, User ]
DESTINATION_FOLDER = "tmp/"
def self.included(klass)
klass.extend ClassLevelMethods
end
@jcasimir
jcasimir / exporter.rb
Created February 26, 2012 17:39
Export ActiveRecord Tables to CSV
require 'csv'
class Exporter
DEFAULT_EXPORT_TABLES = [ Invoice, InvoiceItem, Item, Merchant, Transaction, User ]
DESTINATION_FOLDER = "tmp/"
def self.export_tables_to_csv(tables = DEFAULT_EXPORT_TABLES)
tables.each { |klass| export_table_to_csv(klass) }
end