As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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 | |
ip=$(curl -s https://api.ipify.org) | |
echo "Current public IP address: $ip" |
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 python3 | |
import json | |
import requests | |
import sys | |
if len(sys.argv) <= 1: | |
print('Usage: bp [market]') | |
exit(1) |
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/python | |
# | |
# A very simple python-pcapy example for monitor mode WiFi sniffing. | |
# | |
# Usage example: | |
# $ python pcapySniffer.py mon0 | |
import pcapy | |
import sys | |
import os |
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
// goroutines errors example | |
package main | |
import ( | |
"errors" | |
"fmt" | |
"time" | |
) |
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
const https = require('https'); | |
const url = require('url'); | |
const slack_url = 'https://hooks.slack.com/services/SET_YOUR_SERVICE_URL'; // set your service URL here | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = { | |
'Content-Type': 'application/json' | |
}; | |
exports.handler = function(event, context) { |
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 python3 | |
from subprocess import run, PIPE | |
branch_proc = run(['git', 'branch', '--show-current'], | |
stdout=PIPE, | |
universal_newlines=True, | |
cwd='.') # set CWD to the branch directory | |
if branch_proc.returncode == 0: |
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 python | |
from telethon.sync import TelegramClient | |
from telethon.tl.types import PeerUser, UserStatusOffline | |
from prettytable import PrettyTable | |
# Generate API_ID, API_HASH and SHORT_NAME in https://my.telegram.org/apps | |
API_ID = '' | |
API_HASH = '' | |
SHORT_NAME = '' |
I hereby claim:
- I am membrive on github.
- I am membrive (https://keybase.io/membrive) on keybase.
- I have a public key whose fingerprint is 1818 5A13 A3AE 9FF6 0F59 B1E5 FB09 E8A1 CE1F 8C20
To claim this, I am signing this object:
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/python | |
# | |
# Fernando Membrive | |
# | |
# Checks if the files in a directory, with a certain filename pattern, | |
# exceed a given size. | |
# | |
import os | |
import fnmatch |
OlderNewer