Skip to content

Instantly share code, notes, and snippets.

@parsa
parsa / git-kill.sh
Created February 24, 2017 17:12
Replace master with a branch
git branch -m master old-master
git branch -m seotweaks master
git push -f origin master
@parsa
parsa / stun-servers.md
Created March 27, 2017 14:02
STUN Server List

From: http://olegh.ftp.sh/public-stun.txt

  • 23.21.150.121:3478
  • iphone-stun.strato-iphone.de:3478
  • numb.viagenie.ca:3478
  • s1.taraba.net:3478
  • s2.taraba.net:3478
  • stun.12connect.com:3478
  • stun.12voip.com:3478
  • stun.1und1.de:3478
  • stun.2talk.co.nz:3478
@parsa
parsa / hexchat_external_sasl_auth.md
Last active November 21, 2024 16:44
Nickserv Commands

Generate a certificate

Note: Git Bash comes with OpenSSL

$ openssl req -x509 -new -newkey rsa:4096 -sha256 -days 730 -nodes -out freenode.pem -keyout freenode.pem
Generating a 4096 bit RSA private key
.....................................................++
............................................................................++
writing new private key to 'freenode.pem'
@parsa
parsa / irc.md
Last active April 25, 2017 14:29 — forked from xero/irc.md
irc cheat sheet

IRC Reference

The Basics

  • /join #channel
  • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@parsa
parsa / idev.sh
Last active June 29, 2017 18:18
Acquire an Interactive Session on a SLURM cluster
function idev() {
local nodes="1"
if [[ "$(sinfo -h -o "%P")" =~ .*^$1$.* ]]; then
local partition="$1"
shift
fi
if [[ "$1" =~ [0-9]+ ]]; then
nodes="$1"
shift
fi
@parsa
parsa / make.sh
Created July 25, 2017 14:56
Make OctoTiger on SuperMIC
#!/bin/bash
# Intel 15
source /usr/local/packages/compilers/Intel/parallel_studio_xe_2015/composer_xe_2015.0.090/bin/compilervars.sh intel64
source /usr/local/packages/compilers/Intel/parallel_studio_xe_2015/composer_xe_2015.0.090/bin/debuggervars.sh intel64
set -x
BUILD_PATH=$PWD/build
@parsa
parsa / asprog.py
Last active July 29, 2017 20:32
pyprogress
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def printProgressBar(
iteration,
total,
prefix = '',
suffix = '',
#!/usr/bin/env python
"""This script takes a key ID, fingerprint, email address, publicly exported
key, or a keyring, and prints the random ASCII art visualization of the key
as per the Drunken Bishop algorithm as applied to OpenSSH keys by Dirk Loss."""
import argparse
import os
import re
import subprocess
import sys
@parsa
parsa / Atrium.py
Last active August 24, 2017 18:05
Drunken Bishop
class Atrium(object):
def __init__(self, bishop, key_type, hashtype):
self.bishop = bishop
self.counts = [0] * 153
self.counts[76] = 15
self.key_type = key_type
self.hashtype = hashtype

You can display the full search paths with

g++ -print-search-dirs

or you can find a specific header without writing a source file with something along the lines of