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
dropbox start | |
output=$(dropbox status) | |
while [ "$output" != "Actualizado" ]; do | |
echo "$output" | |
sleep 2 | |
output=$(dropbox status) | |
done | |
echo "$output" | |
dropbox autostart n | |
dropbox stop |
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
import json | |
import requests | |
class Station: | |
name = "" | |
uid = 0 | |
lat = "" | |
lon = "" | |
quality = "" |
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
import sys | |
import re | |
class Rule: | |
def __init__(self, line): | |
line = line.split(",") | |
self.part = line[0] | |
self.application = line[1].replace(" ","") | |
self.pattern = line[2].replace(" ","") | |
self.title = line[3] |
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
class Transaction{ | |
String addr; | |
double amount; | |
String timestamp; | |
Transaction(String addr, double amount,String ts){ | |
this.addr = addr; | |
this.amount = amount; | |
this.timestamp = ts; | |
} | |
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
/* | |
Este script mantiene limpia mi bandeja de entrada, archivando correos antiguos | |
*/ | |
function gmailAutoArchive() { | |
gmailAutoarchiveHelper("Informes",3); | |
gmailAutoarchiveHelper("Sistemas",3); | |
gmailAutoarchiveHelper("Diseños",3); | |
gmailAutoarchiveHelper("inbox",7); | |
} |
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/sh | |
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses | |
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC | |
# address, seeded from the UUID of the connection and the date plus the hour eg: | |
# 'c31bbcc4-d6ad-11e7-9a5a-e7e1491a7e20-2017-11-20-09' | |
# This makes your MAC difficult to track across WiFi providers, and | |
# for one provider to track across days. |
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 far-scp | |
if count $argv > /dev/null | |
echo Connecting through $argv[1] | |
echo Source: $argv[2] | |
echo Dest: $argv[3] | |
scp -oProxyJump=$argv[1] $argv[2] $argv[3] | |
else | |
echo " usage: far-scp [proxy-addr] [src] [dst]" | |
end | |
end |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
tb "gopkg.in/tucnak/telebot.v2" | |
"io/ioutil" | |
"log" | |
"math/rand" | |
"net" |
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
# copy this code to .bashrc | |
# This loop generates aliases for the hosts you've configured on ./ssh/config. | |
for x in $(grep '^Host' ~/.ssh/*config 2>/dev/null | grep -v '[?*]' | cut -d ' ' -f 2-); do | |
alias "$x"="ssh $x" | |
done |
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
#!/usr/bin/env bash | |
FAIL='\033[0;31m' | |
OK='\033[0;32m' | |
END='\033[0m' # No Color | |
declare -a arr=("rsyslogd" "crond" "noelement") | |
## now loop through the above array | |
for i in "${arr[@]}" |
OlderNewer