$ mutt -f /tmp/default.mailbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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`; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amount | |
basis | |
contract_type | |
currency | |
date_start | |
date_expiry | |
duration | |
duration_unit | |
symbol | |
barrier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
symbol | |
payout | |
tick_expiry | |
currency | |
shortcode | |
expiry_daily | |
is_after_settlement | |
bid_price | |
is_expired | |
ask_price |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding lock mechanism to GCS remote backend by suing pubsub Topics. | |
Concept is imilar to how we create/delete lock file to acquirs/release lock. | |
We are using remote state-file in our team.We need this in our team to be able to work in a safer way. Our team is small but still this simple change can improve out ability to work together. | |
Code changes is small. | |
```hcl | |
terraform { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mount /dev/xvdf /mnt | |
sudo chown admin /mnt -R | |
if [ ! -d /mnt/go ] | |
then | |
cd /mnt | |
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz | |
tar --gzip -xf go1.10.linux-amd64.tar.gz | |
mkdir -p gopath | |
echo 'export GOPATH=/mnt/gopath' >> ~/.bashrc | |
echo 'export PATH=$PATH:/mnt/go/bin/:$GOPATH/bin' >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku logs -a XXXX -n 10000 >> /tmp/logs.heroku | |
cat /tmp/logs.heroku |cut -d' ' -f 5|cut -d'"' -f 2|perl -e 'while ($a=<>) {chomp $a;$a=~ /event=([a-zA-Z_-]+)/;print "$1,$a\n"}' |sort -u -t, -k1,1 |cut -d, -f2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2015 Google Inc. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
OlderNewer