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
DO $$ | |
DECLARE | |
table_rec record; | |
BEGIN | |
FOR table_rec IN SELECT table_name | |
FROM information_schema.tables | |
WHERE table_schema = 'public' | |
LOOP | |
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema = 'staging' AND table_name = table_rec.table_name) THEN | |
EXECUTE 'TRUNCATE TABLE staging.' || table_rec.table_name || ';'; |
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
'Ultima realise counter + spettro adeguate le variabili per non avere count negativi oltre il riporto, | |
'e stabile lo zero batterie sempre per il medesimo motivo. Poi lettura della HV per un paio di secondi | |
'Firmware inserito dal ser n° 008 in avanti. I precedenti hanno bisogno di upgrade. | |
'Aggiunta funzione killer che dopo tot accensioni non procede....per annullarla accendere l'apparecchio | |
'senza collegare la sonda (variabile a 0) per alcuni minuti finchè rimuove il blocco da solo. | |
'Scheda contatore con ingresso interrupt0 | |
$prog &HFF , &HE1 , &HD9 , &H00 ' | |
' e lettura batteria + 2 trimmer di setup | |
$regfile = "m8def.dat" | |
$crystal = 8000000 |
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
## | |
# This is an adoption from Oh My Zsh for Google Cloud Shell | |
## | |
main() { | |
# Install zsh | |
sudo apt-get -qq update | |
sudo apt-get -qq install zsh -y |
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
from bs4 import BeautifulSoup | |
import requests | |
response = requests.get('http://www.useragentstring.com/pages/useragentstring.php?name=All').text.encode('utf-8') | |
soup = BeautifulSoup(response, 'html.parser') | |
fd = open('user_agents.csv','a') | |
for user_agent in soup.findAll('li'): | |
fd.write(user_agent.get_text() + '\n') | |
fd.close() |
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
{ | |
"success": true, | |
"message": null, | |
"result": { | |
"Bid": 18550, | |
"Ask": 18558.54000002, | |
"Last": 18540 | |
} | |
} |
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
function main() { | |
// Insert here your WebHook URL obtained from Slack and the name of the channel | |
var slack_webhook_url = 'https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXX/XXXXXXXXXXXXXXX'; | |
var slack_channel_name = 'XXXXXXX'; | |
var bittrex_url = 'https://bittrex.com/api/v1.1/public/getticker?market=USDT-BTC'; | |
var url_response = UrlFetchApp.fetch(bittrex_url).getContentText(); | |
var response_parsed = JSON.parse(url_response); | |
var last_usdt_btc = parseInt(response_parsed.result.Last); | |
send('*USDT-BTC* --> ' + last_usdt_btc, slack_channel_name); |