Skip to content

Instantly share code, notes, and snippets.

View jchoca's full-sized avatar
🌱
Eating plants

Jimmy Choca jchoca

🌱
Eating plants
View GitHub Profile
#! /bin/bash
######################################################################
#
# This script generates an SSL certficate for local development. To
# execute the script, run `bash create-dev-ssl-cert.sh`. Sudo is
# needed to save the certificate to your Mac KeyChain. After the cert
# is generated, you can use `HTTPS=true yarn start` to run the web
# server.
#
@ilgityildirim
ilgityildirim / ngrok.md
Created January 13, 2018 19:36
Tunnel your local work to the internet using Ngrok
  • Download Ngrok first & unzip it & enter its directory
$ chmod +x ngrok
$ cp ngrok /usr/local/bin
  • Now try if everything is OK (in a directory where ngrok file doesn't exist). If you see Ngrok help, it means everything is OK.
$ ngrok -help
@komuw
komuw / pycrypto_DES3.py
Last active March 28, 2023 06:35
python DES3(triple DES encryption)
`pip install pycrypto`
from Crypto.Cipher import DES3
from Crypto import Random
key = 'Sixteen byte key'
iv = Random.new().read(DES3.block_size) #DES3.block_size==8
cipher_encrypt = DES3.new(key, DES3.MODE_OFB, iv)
plaintext = 'sona si latine loqueri ' #padded with spaces so than len(plaintext) is multiple of 8
encrypted_text = cipher_encrypt.encrypt(plaintext)
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@willurd
willurd / web-servers.md
Last active April 15, 2024 09:55
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000