Skip to content

Instantly share code, notes, and snippets.

View iamnader's full-sized avatar

Nader Akhnoukh iamnader

View GitHub Profile
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreigkkvenab43mjyudduqmgxog52rbuerpepxydyl7gjk4nsyg4jnii ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
#!/bin/bash
shouldIRun() {
# branch=`git rev-parse --abbrev-ref HEAD`
appString=$1
apps=(${appString//,/ })
CIRCLE_COMPARE_URL=$2
halt=true
@iamnader
iamnader / github_code_stats.rb
Last active September 28, 2018 20:32
Github Code Stats
require 'octokit'
require 'csv'
class GitStats
TOKEN = "<insert token>"
ORG = "<insert org>"
def process
process_repo_stats
process_contributors
@iamnader
iamnader / unused.sh
Created August 28, 2018 19:15
Script to find unused env vars
app=my-app
for var in `heroku config -a $app --json | jq '. | keys | .[]' -r`
do
if ! ag $var `bundle show --paths` . --count --silent --nofilename >/dev/null;
then echo $var;
fi;
done
@iamnader
iamnader / gist:2a124f67f7ccdc295f8b
Last active November 5, 2015 21:53 — forked from alexmcpherson/gist:e414f92976f90e6a46a9
Culture for Kapost Engineering

originally put together by @alexmcpherson

Practical / Tactical

Be on time to meetings

Meetings need a goal and a runner to get that goal accomplished

Defend your time from distractions and use it effectively on moving product forward

@iamnader
iamnader / gist:4151649
Created November 27, 2012 00:39
Eloqua Ruby API
require 'net/https'
module Eloqua
class Client
attr_reader :site, :user
def initialize(site=nil, user=nil, password=nil)
@site = site
@user = user
@password = password
@iamnader
iamnader / gist:3106401
Created July 13, 2012 18:12
creating queue error
ruby-1.9.2-head :001 > MyMq.client
S
.
capabilitiesFdpublisher_confirmsIexchange_exchange_bindingsI
basic.nackIconsumer_cancel_notifyI copyrightS$Copyright (C) 2007-2012 VMware, Inc.
informationS5Licensed under the MPL. See http://www.rabbitmq.complatformS
Erlang/OTPproductRabbitMQversionS2.8.1PLAIN AMQPLAINen_US?
?
class MyMq
def self.client
unless @client
c = Bunny.new(APP_CONFIG["cloudamqp_url"], :logging => true)
c.start
@client = c
end
@client
end
@iamnader
iamnader / gist:3094364
Created July 11, 2012 23:08
profiler output
update bokchoy.unique_datas 261ms Tue Jul 10 2012 14:39:07
query:{
"n_id" : ObjectId("4e4afa8bac36dd000100006b"),
"dim" : "cat",
"dim_val" : "Best Of",
"cl_id" : ObjectId("4f6891ed0572c9000100017b"),
"t" : "u",
"v" : "7f4b9eb126a209da653852a6ec25baa9"
} updateobj:{
"n_id" : ObjectId("4e4afa8bac36dd000100006b"),
@iamnader
iamnader / mongostat
Created July 11, 2012 23:06
Slow Upserts on Indexed Data (though not all in RAM)
insert query update delete getmore command flushes mapped vsize res locked % idx miss % qr|qw ar|aw netIn netOut conn time
0 11 739 0 0 399 0 30.9g 64.4g 550m 43.9 0 0|0 0|1 183k 45k 10 16:03:25
0 5 423 0 0 232 0 30.9g 64.4g 549m 65.1 0 0|0 0|1 106k 26k 10 16:03:26
0 5 471 0 0 261 0 30.9g 64.4g 549m 58.9 0 0|0 0|0 119k 29k 10 16:03:27
0 6 666 0 0 371 0 30.9g 64.4g 548m 50.4 0 0|0 0|0 166k 40k 10 16:03:28
0 8 637 0 0 398 0 30.9g 64.4g 548m 43.8 0 0|0 0|0 167k 44k 10 16:03:29
0 7 727 0 0 419 0 30.9g 64.4g 549m 32.1 0 0|0 0|1 185k 45k 10 16:03:30
0 6 821