Skip to content

Instantly share code, notes, and snippets.

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

Eoin Gairleog Omega9

🏠
Working from home
View GitHub Profile
@ryansb
ryansb / cjd.instructions
Created April 19, 2013 18:29
Quick instructions for installing CJDNS on RHEL derivatives
yum install gcc gcc-g++ make git
cd /opt
git clone git://github.com/cjdelisle/cjdns.git
cd cjdns
./do
./cjdroute --genconf > /etc/cjdroute.conf
curl https://gist.github.com/ryansb/5422219/raw/4f8c788ce6d608e6e9539238ec8b39b6e13e4de2/cjdns > /etc/init.d/cjdns
@varemenos
varemenos / oh-my-zsh-action-aliases.zsh
Last active December 7, 2016 00:30
oh-my-zsh Action Aliases
alias untar='tar -zxvf'
alias untarxz='tar -xJf'
alias pbcopy='xclip -selection clipboard' # OSX compatibility
alias pbpaste='xclip -selection clipboard -o' # OSX compatibility
alias orphans='sudo pacman -Rs $(pacman -Qdtq)' # removes orphan packages from Archlinux
@protrolium
protrolium / ffmpeg.md
Last active July 23, 2024 06:07
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@shazow
shazow / convert-gifs.sh
Last active January 22, 2024 10:13
Batch convert a directory of gifs into mp4
#!/usr/bin/bash
# Convert *.gif into *.mp4, skip if already exists.
outdir="."
for path in *.gif; do
out="${outdir}/${path/.gif/}.mp4"
[[ -f "$out" ]] && continue
ffmpeg -f gif -i "${path}" "${out}"
done
@pbiggar
pbiggar / enex2md.clj
Last active January 8, 2016 16:18
enex to markdown
;;; This script by Paul Biggar, available at https://gist.github.com/pbiggar/6323088a31d689c61a24
;;;
;;; This converts Evernote files into plaintext (not really markdown), so you can move your stuff out of evernote into a markdown editor.
;;;
;;; First, export your Evernotes, using File -> export notes. Export them into "My Notes.enex".
;;; copy this file into the same direcory as "My Notes.enex".
;;;
;;; To run this file, you'll need some dependencies, but they should only take a moment to install.
;;; leinigen: On OSX, use "brew install leiningen".
;;; lein-exec: From the terminal, run `mkdir ~/.lein; echo '{:user {:plugins [[lein-exec "0.3.5"]]}}' > ~/.lein/profiles.clj
@aNNiMON
aNNiMON / EnexToJson.java
Created August 16, 2016 10:40
Converts Evernote .enex files to json
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.EnumSet;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.json.JSONArray;
@princebot
princebot / install_wormhole.bat
Created July 29, 2017 17:44
Install Python magic-wormhole on Windows.
::
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and
:: its prerequisites. Run this as an administrator.
::
:: Install chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install Python 3.
choco install -y python
@mort3za
mort3za / torrc
Last active March 14, 2024 14:44
Using tor with bridges, torrc example config (bit.ly/m3torrc)
# sudo apt-get install obfs4proxy obfsproxy tor
# sudo vi /etc/tor/torrc
UseBridges 1
ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy managed
# send email to bridges@torproject.org with body `get transport obfs4` you can get new bridges.
bridge obfs4 195.154.49.15:44705 BACD07DACE996093DC7635F33A98C49... cert=xc/wtKNWADfJQf232xSXT0WpzsaINw6fgPvZBy5Rkw4.../ypaZPDug9L... iat-mode=0
@ummjackson
ummjackson / killabot.py
Created May 4, 2018 08:05
killabot v1 (wip)
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein
import tweepy
import re
from fuzzywuzzy import fuzz
# Credentials go here (generate at: https://apps.twitter.com)
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret')
auth.set_access_token('access_token', 'access_token_secret')
# Connect to Twitter
@skratchdot
skratchdot / gif-to-mp4.sh
Created January 1, 2019 17:23
convert a gif to an mp4 using ffmpeg
#!/bin/bash
# https://unix.stackexchange.com/questions/40638/how-to-do-i-convert-an-animated-gif-to-an-mp4-or-mv4-on-the-command-line/294892#294892
ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4