Skip to content

Instantly share code, notes, and snippets.

View pacohope's full-sized avatar

Paco Hope pacohope

View GitHub Profile
@joyeusenoelle
joyeusenoelle / Mastodon.md
Last active January 23, 2024 02:43
An increasingly less-brief introduction to Mastodon
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
@thefloweringash
thefloweringash / fix-freebsd-update.sh
Created January 31, 2014 10:09
There I "fixed" freebsd-update.
#!/bin/sh
# freebsd-update makes assumptions that don't match the world I live
# in. My local mirror has a 20ms rtt, can probably saturate my 130mbps
# line speed and takes about 2 minutes to fetch all of FreeBSD 10's
# dists; freebsd-update's mirrors are at least 140ms away, and take
# about 4 hours to fetch the changes from 9.1-RELEASE-p10 to
# 10.0-RELEASE.
#
# freebsd-update is a clever script that downloads a lot of bsdiff
@tskaggs
tskaggs / OSX-Convert-MOV-GIF.md
Last active May 6, 2024 13:07
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick

Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

Preparation

Install FFmpeg

  • $ brew install ffmpeg [all your options]
    • Example: $ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@mariocesar
mariocesar / dyndns_route53.py
Created November 25, 2012 06:08
Update a Route53 Record if your public IP changes. Like DynDNS
"""
Requeriments:
$ sudo pip install boto dnspython
Edit ~/.boto to use your AWS credentials
"""
import time
import sys
@MarkRose
MarkRose / reuse_agent.sh
Last active September 11, 2023 06:42
Reuse existing ssh-agent or start a new one
# Reuse an existing ssh-agent on login, or create a new one. Append this to your .bashrc
# I have no idea who the author of the original concept was for reusing agents. This
# version also handles the case where the agent exists but has no keys.
GOT_AGENT=0
for FILE in $(find /tmp/ssh-* -type s -user ${LOGNAME} -name "agent.[0-9]*" 2>/dev/null)
do
SOCK_PID=${FILE##*.}