Skip to content

Instantly share code, notes, and snippets.

View ah-cog's full-sized avatar

Ashley Hayes ah-cog

  • San Francisco, California
View GitHub Profile
@ah-cog
ah-cog / how-to.txt
Created December 12, 2020 10:40 — forked from simonw/how-to.md
How to create a tarball of a git repository using "git archive"
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
@ah-cog
ah-cog / split_silence.sh
Created April 18, 2020 03:44 — forked from jochemstoel/split_silence.sh
Guide to split audio recording by silence with SoX and ffmpeg
# First denoise audio
## Get noise sample
ffmpeg -i input.ogg -vn -ss 00:00:00 -t 00:00:01 noise-sample.wav
## Create noise profile
sox noise-sample.wav -n noiseprof noise.prof
## Clean audio from noise
sox input.ogg clean.wav noisered noise.prof 0.21
@ah-cog
ah-cog / 0fixup.md
Created June 22, 2018 21:34 — forked from silent1mezzo/0fixup.md
On undoing, fixing, or removing commits in git

A git choose-your-own-adventure!

This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn't that git is so complicated that you need a large document to take care or your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.

@ah-cog
ah-cog / install-pygit2-on-ubuntu-16.04.md
Last active October 1, 2017 00:21 — forked from bendavis78/gist:3157948
Installing pygit2 on Ubuntu 16.04

Download and build libgit2

cd ~/.local/src/
git clone git://github.com/libgit2/libgit2.git 
cd libgit2
mkdir build && cd build
cmake ..
cmake --build .

If debugging, use the following cmake commands instead:

@ah-cog
ah-cog / framework-electron-react.md
Last active August 31, 2017 10:48 — forked from matthewjberger/notes.md
How to make an electron app using Create-React-App and Electron with Electron-Builder.

This note describes how I assembled an application framework with:

  • Electron: for cross platform application frame
  • React: for UI
    • Node
  • (maybe) Postgres in Docker (with persistence via shared volume)
  • (maybe) SQLite
  • (maybe) Sequelize (in Node/React to interface with DB)
  • (maybe) Docker

Prerequisites

@ah-cog
ah-cog / install-pip-for-babun.md
Last active July 29, 2017 08:30 — forked from dragon788/gist:69295688c66f25ae3a97
Install pip for Babun

When developing with Python in on Windows, I use the Babun shell. Here, I describe how to set up a Python environment for use in Babun.

Install easy_setup:

wget https://bootstrap.pypa.io/ez_setup.py -O - | python

Use easy_setup to install pip:

@ah-cog
ah-cog / curl.md
Created July 19, 2017 03:40 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@ah-cog
ah-cog / iterm2-solarized.md
Created January 31, 2017 19:21 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@ah-cog
ah-cog / unique_id_generator.c
Last active May 7, 2016 22:49 — forked from shabinesh/id.c
unique id generator
#include<stdio.h>
#include<sys/time.h>
int main()
{
int i;
for(i =0;i < 32; i++)
func(i);
return 0;
}
@ah-cog
ah-cog / git Usage Patterns.md
Last active July 18, 2016 12:39 — forked from hofmannsven/README.md
git Usage Patterns

Using Git

Top commands

Commit changes, create pull request, and update branch

First, commit your changes:

git commit -m "Descriptive commit message."