Skip to content

Instantly share code, notes, and snippets.

View wireddude's full-sized avatar
🏠
Working from home

wireddude wireddude

🏠
Working from home
  • 19:53 (UTC -07:00)
View GitHub Profile
@RyuzakiKK
RyuzakiKK / PrintNoteCryptDB.java
Last active May 24, 2017 15:52
Supposed to print NoteCrypt Database. Mostly copy/paste from "notecrypt/utils"
package com.notecrypt.utils;
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException;
@philgruneich
philgruneich / OCRtoInteract.py
Last active March 17, 2020 00:28
Requires Pythonista for iOS and Interact for iOS. Sends image and returns OCR'd text. Opens text in Interact unless used from action extension, then adds to clipboard.
# coding: utf-8
import requests
import photos
from PIL import Image, ImageEnhance
import StringIO
import appex
import console
import json
import keychain
@gruber
gruber / Paste URL From Safari Tab.scpt
Created June 29, 2015 00:01
Paste URL From Safari Tabs
set _old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {""}
tell application "System Events"
set _current_app to name of the first process whose frontmost is true
end tell
tell application "Safari"
set _urls to {}
repeat with i from 1 to 6 -- how many Safari windows to show URLs from
anonymous
anonymous / blockerList.json
Created June 25, 2015 00:05
Testing Safari Content Blocker on iMore.com
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@laurenorsini
laurenorsini / MakeOpenVPN.sh
Last active September 14, 2023 19:58
MakeOpenVPN.sh by Eric Jodoin
#!/bin/bash
# Default Variable Declarations
DEFAULT="Default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".3des.key"
CA="ca.crt"
TA="ta.key"
@laurenorsini
laurenorsini / server.conf
Last active June 2, 2023 15:45
OpenVPN configuration for /etc/openvpn/server.conf
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
#! /usr/bin/env python3
import datetime
import sys
try:
import xmlrpc.client as xmlrpclib
except:
import xmlrpclib
@tomoinn
tomoinn / rainbow_strip.cc
Created July 10, 2013 18:49
A bit of code to demonstrate the light strip from insomnialighting.com here - http://www.insomnialighting.com/catalog/index.php?main_page=product_info&cPath=6_4&products_id=8 using an arduino nano. Data and clock lines on the strip are connected to pins 11 and 13 of the nano respectively to make use of hardware SPI.
#include "LPD8806.h"
#include "SPI.h"
// Simple test for 260 (5 meters) of LPD8806-based RGB LED strip, this is a
// modified version of the original demo - it creates a rainbow, animates it
// and fades from black->colours->white->colours->black in a cycle, holding
// somewhat longer on the full colour, all while cycling the rainbow colours.
// This has been tested with a high density (260 LEDs / 5m) strip and a nano
// board, running from a 5V 10A PSU.