Skip to content

Instantly share code, notes, and snippets.

@maaand
maaand / springer-free-maths-books.md
Created October 17, 2022 22:37 — forked from bishboria/springer-free-maths-books.md
Springer made a bunch of books available for free, these were the direct links
@maaand
maaand / gist:9e3939ddcbd626a940a01b44bf36d154
Last active November 22, 2018 12:29
tsung.xml http-example
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
<!-- Client side setup -->
<clients>
<client host="localhost" use_controller_vm="true"/>
</clients>
<!-- Server side setup -->
def self.generate_oauth_signature
# Capture all oauth parameters, percent encode them, and create the parameter_string.
oauth_consumer_key = '163'#290'
logger.info "Consumer Key : #{oauth_consumer_key}"
oauth_nonce = Digest::MD5.hexdigest(Time.now.to_s + rand(1..100).to_s)[0..5]#"3FC01D14-BD45-4940-BD78-1FC3F03CC11A"
logger.info "Nonce : #{oauth_nonce.to_s}"
oauth_signature_method = "HMAC-SHA1"
logger.info "Signature Method : #{oauth_signature_method}"
oauth_timestamp = Time.now.to_i# "1435622860"
# This is a temporary solution for login via the API call we have.
def login
begin
flash[:notice] = nil
email = params["email"]
password = params["password"]
puts email
puts password
#This gets the user's id number (which is the only piece of info we need from the user to login)
@maaand
maaand / -
Last active August 29, 2015 14:23
50.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta1-f1.walmart.com.
51.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta1-f2.walmart.com.
52.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta1-f3.walmart.com.
53.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta1-f4.walmart.com.
55.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta2-f1.walmart.com.
56.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta2-f2.walmart.com.
57.130.15.10.in-addr.arpa. 7200 IN PTR edc-emailmta2-f3.walmart.com.
50.30.15.10.in-addr.arpa. 7200 IN PTR ndc-emailmta1-f1.walmart.com.
51.30.15.10.in-addr.arpa. 7200 IN PTR ndc-emailmta1-f2.walmart.com.
52.30.15.10.in-addr.arpa. 7200 IN PTR ndc-emailmta1-f3.walmart.com.
@maaand
maaand / gist:533cccba45dde78c545e
Created February 18, 2015 19:25
-- header --
ITEM_ID|SELLER_ID|UPC|AVAILABILITY_STATUS|QTY_IN_STOCK|SRC_CRE_TS|SRC_MODFD_TS|CRE_TS|UPD_TS
34310671|24|0084838702988|NOT_AVAILABLE|0.0000|2015-02-06 21:24:59|2015-02-06 21:24:59|2015-02-06 00:00:00|2015-02-06 22:18:27
43258540|10|MP10008285932|NOT_AVAILABLE|0.0000|2015-02-06 21:24:50|2015-02-06 21:24:50|2015-02-06 00:00:00|2015-02-06 22:18:27
43351166|22|I56PCFVjo5003|NOT_AVAILABLE|0.0000|2015-02-06 21:25:03|2015-02-06 21:25:03|2015-02-06 00:00:00|2015-02-06 22:18:27
@maaand
maaand / gist:e799b1815c479dd3fbb4
Last active August 29, 2015 14:07
Happybase Connection Pooling (wrong way)
Wrong way :
pool = happybase.ConnectionPool(size=10, host='hbase.targeting.walmartlabs.com')
conn = pool.connection() # conn is now established and waiting for data
table = conn.table('candidate_email_sends_by_date')
...
...
# some long processing work the script is taking more than 3 mins
# above connection pool has been idle for > 3 mins, Vip will start killing them
@maaand
maaand / gist:c8d4a323ef80d1e0cded
Last active August 29, 2015 14:03
Install Maven using Macports on OS X 10.9 Mavericks
% sudo port selfupdate;
% sudo port upgrade outdated;
% sudo port install maven3;
% sudo port select --set maven maven3;
— add following to .zshenv -- start using zsh if you dont —
set -a
[[ -d /opt/local/share/java/maven3 ]] &&
M3_HOME=/opt/local/share/java/maven3 &&
M2_HOME=/opt/local/share/java/maven3 &&