Skip to content

Instantly share code, notes, and snippets.

View roblogic's full-sized avatar
💭
probably playing code golf

Rob Papesch roblogic

💭
probably playing code golf
  • Auckland, NZL
  • 19:17 (UTC +12:00)
View GitHub Profile
@mlen
mlen / flac2alac
Last active April 23, 2024 07:02
FLAC to ALAC converter. Requires Mac OS X and `flac` binary installed (ie. via Homebrew: `brew install flac`).
#!/usr/bin/env bash
set -e
convert_to_alac() {
flac="$1"
aiff="${flac%.*}.aiff"
alac="${flac%.*}.m4a"
flac -s -d --force-aiff-format -o "$aiff" "$flac"
afconvert -f m4af -d alac "$aiff" "$alac"
@gustavohenrique
gustavohenrique / soap-curl-shell
Created June 11, 2013 19:24
SOAP request using curl
# request.xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wst="http://sensedia.com/repository/wstoolkit">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>system</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">manager</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">DWk64SMfJ6RxHAKgPRGtPA==</wsse:Nonce>
<wsu:Created>2013-04-17T18:36:54.013Z</wsu:Created>
</wsse:UsernameToken>
@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management

notes of things i learn while watching destroy all software

##das-0001-statistics-over-git-repositories

  • git rev-list HEAD -- takes the ref (in this case HEAD) and crawling backwards. so the most recent commit will appear first
    • to reverse (have most recent be first) git rev-list --reverse HEAD oldest -> newest
  • xargs
    • takes multiline output and joins them with a space
    • e.g.

$ echo '1

@danwagnerco
danwagnerco / vim_vundle_and_conemu.md
Created June 22, 2015 20:43
This is a Windows-specific walkthrough for installing Vim, Vundle and ConEmu

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows
@stig
stig / percentiles.sh
Last active February 4, 2022 14:55
Print percentiles for list of data points
#!/bin/sh
# Exit immediately on error
set -e
# set -x
# Create temporary file
FILE=$(mktemp /tmp/$(basename $0).XXXXX) || exit 1
trap "rm -f $FILE" EXIT
@vasanthk
vasanthk / System Design.md
Last active May 1, 2024 16:16
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@codeinthehole
codeinthehole / boo
Created April 15, 2016 08:20
Notifier script to use with long-running commands
#!/usr/bin/env bash
#
# Show an OSX alert
#
# This is useful when used in conjunction with a long-running script. Use this script to
# get a notification when te long-running script finishes.
#
# Eg:
#
# $ ./someprocess ; boo
@ericbn
ericbn / .vimrc
Last active March 31, 2024 10:39
Vim Powerline-like status line without the need of any plugin
" Statusline (requires Powerline font)
set statusline=
set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %)
set statusline+=%< " Truncate line here
set statusline+=%f\ " File path, as typed or relative to current directory
set statusline+=%{&modified?'+\ ':''}
set statusline+=%{&readonly?'\ ':''}
set statusline+=%= " Separation point between left and right aligned items
set statusline+=\ %{&filetype!=#''?&filetype:'none'}
set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'')
@roblogic
roblogic / msys2-setup.md
Last active March 26, 2024 19:20
MSYS2 first time setup

MSYS2 is a minimalist linux/unix shell environment for Windows.

Quote: "A modern replacement for MSYS bringing recent versions of the GNU toolchains, Git and other common Unix command line tools to the Windows platform"

1. Install

Do all the steps listed here: http://msys2.github.io/
(troubleshooting guide here: https://github.com/msys2/msys2/wiki/MSYS2-installation )

2. Set up proxies