Skip to content

Instantly share code, notes, and snippets.

View kavehmz's full-sized avatar

Kaveh Mousavi Zamani kavehmz

  • Berlin
View GitHub Profile
// runqput tries to put g on the local runnable queue.
// If next if false, runqput adds g to the tail of the runnable queue.
// If next is true, runqput puts g in the _p_.runnext slot.
// If the run queue is full, runnext puts g on the global queue.
// Executed only by the owner P.
func runqput(_p_ *p, gp *g, next bool) {
if randomizeScheduler && next && fastrand()%2 == 0 {
next = false
}
symbol
payout
tick_expiry
currency
shortcode
expiry_daily
is_after_settlement
bid_price
is_expired
ask_price
entry_spot_epoch
is_path_dependent
ask_probability_news_factor
ask_probability_amount
bid_price
price
is_expired
bid_probability_amount
opposite_contract_commission_markup_amount
commission_markup_amount
amount
basis
contract_type
currency
date_start
date_expiry
duration
duration_unit
symbol
barrier

All emails in QA machines are redircred to nobody@localhost

All email for nobody@localhost is stored in /tmp/default.mailbox

reading emails

$ mutt -f /tmp/default.mailbox 

checking html format of email

$i=0;
while (<>) {
$i++;
print "\n$i\n";
$ip=$_;
chomp $ip;
$s = 'curl -X POST "https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules" -H "X-Auth-Email: sysadmin@regentmarkets.com" -H "X-Auth-Key: XVXCVXCVXCVXCVXCVXCVXCVCXVXC" -H "Content-Type: application/json" --data \'{"mode":"block","configuration":{"target":"ip","value":"'.$ip.'"},"notes":"2015-08-01 DDOS"}\'';
print $s;
eval `$s`;
}