Skip to content

Instantly share code, notes, and snippets.

@h4cc
h4cc / Makefile
Last active July 11, 2021 10:32
Ubuntu 18.04 Bionic Beaver - Basic packages i usually install
#
# Ubuntu 18.04 (Bionic Beaver)
#
# Basic packages i usually install.
#
# Author: Julius Beckmann <[email protected]>
#
# Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e
# Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b
@ccooper21
ccooper21 / mqtt_websocket_example.py
Created October 16, 2017 00:17
Example MicroPython MQTT over WebSocket script
# This example script requires the MicroPython changes in the following branches:
#
# https://github.com/ccooper21/micropython/tree/websocket-client-support
# https://github.com/ccooper21/micropython-lib/tree/umqtt.simple-websocket-support
import usocket as socket
import utime as time
from websocket import websocket
from umqtt.simple import MQTTClient
function Get-WebFile {
param(
[Parameter(Mandatory=$true)]
$Uri,
[string] $OutFile,
[string] $Hash,
[string] $HashAlgorithm = 'SHA256'
)
if (-not $OutFile) {
@laurivosandi
laurivosandi / esp32-oled-demo.py
Last active February 8, 2022 03:22
OLED screen demo on ESP32 with MicroPython
# Pull the SDD1306 lib from here https://github.com/adafruit/micropython-adafruit-ssd1306/blob/master/ssd1306.py
from time import sleep_ms
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
buf = "wubba lubba dub dub "
i2c = I2C(-1, Pin(4),Pin(5),freq=40000) # Bitbanged I2C bus
assert 60 in i2c.scan(), "No OLED display detected!"
@simply-coded
simply-coded / BrowseForFolder.vbs
Created August 6, 2017 01:55
Browse for folder dialog box in VBScript.
Function BrowseForFolder()
'@description: Browse for folder dialog.
'@author: Jeremy England (SimplyCoded)
Dim oFolder
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0,"Select a Folder",0,0)
If (oFolder Is Nothing) Then
BrowseForFolder = Empty
Else
BrowseForFolder = oFolder.Self.Path
End If
javascript: (function() {
var results = [];
var totalTrips = 0;
var cancelledTrips = 0;
var nbTripsShared = 0;
var finishedParsing = false;
var totalNbPeopleSharedWith = 0;
var urlCalculated = [];
function parsePage(page) {
@fser
fser / honey-passwd
Created May 12, 2017 12:17
Password dump between 02/09/17 and 05/10/17 on a public ssh honeypot
4564 123456
4315 password
3543 admin
2964 1234
2620 12345
2090 ubnt
2038 root
1802 111111
1392 000000
1346 support
@tafarij
tafarij / install-pulse.sh
Created April 22, 2017 13:05
Install Pulse Secure on Ubuntu 16.04
# https://vt4help.service-now.com/kb_view_customer.do?sysparm_article=KB0010740#linux
wget https://secure.nis.vt.edu/resources/downloads/pulse-8.2R5.i386.deb
sudo dpkg –i pulse-8.2R5.i386.deb
/usr/local/pulse/PulseClient.sh install_dependency_packages
@enzinier
enzinier / install_font_adobe_source_code_pro.sh
Created March 4, 2017 03:38
Install font Adobe Source Code Pro on Ubuntu 16.04 LTS
#!/bin/sh
# Userland mode (~$USER/), (~/).
# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts
echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
@marcoscastro
marcoscastro / btc_usd.py
Created February 15, 2017 09:53
Python - Monitoramento do preço do bitcoin em dólares
'''
Get Bitcoin Value
http://api.coindesk.com/v1/bpi/currentprice.json
'''
import urllib.request, json, time
def obter_valor():
try:
url = "http://api.coindesk.com/v1/bpi/currentprice.json"