Skip to content

Instantly share code, notes, and snippets.

View mauleyzaola's full-sized avatar

Mauricio Leyzaola mauleyzaola

View GitHub Profile
@davyzhang
davyzhang / sublime_dark.xml
Last active August 29, 2015 14:00
liteide sublime text color theme modified for golang in
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Sublime Text 2">
<!--
By davyzhang@gmail.com
Improvements are welcome
Public Domain, 2014
Navigate To: /Applications/LiteIDE.app/Contents/Resources/liteeditor
Create a new file with the content.
Restatr LiteIDE
@iansealy
iansealy / orca-setup.md
Last active November 13, 2015 21:00
Orca setup notes

Install

Burn ubuntu-14.04-desktop-amd64.iso to DVD and boot from it and choose "Try Ubuntu".

Run "GParted Partition Editor" and set up the following primary partitions:

/dev/sda1   ntfs    windows  92160 MiB /   90.00 GiB
/dev/sda2   ext2    boot      1024 MiB /    1.00 GiB
/dev/sda3 ext4 ubuntu 143360 MiB / 140.00 GiB
linux /boot/vmlinuz<press tab> .efi.signed root=UUID=<the UUID from above>
@thure
thure / gist:4197998
Created December 3, 2012 21:02
Split .flac and convert to .m4a (ALAC) on MacOS X
brew install flac ffmpeg cuetools shntool
cuebreakpoints 1.cue | shnsplit -o flac 1.flac
for f in split-track*.flac
do
ffmpeg -i "$f" -acodec alac "${f%.flac}.m4a";
done
@howeyc
howeyc / s3cp.go
Last active January 21, 2021 20:07
Golang - copy files to / from s3
// From https://github.com/kr/s3/tree/master/s3cp
// Added public read for uploaded files
// Command s3cp copies a file to or from Amazon S3.
//
// Usage:
//
// s3cp file url
// s3cp url file
//
// The file does not need to be seekable or stat-able. You can use s3cp to
@ssmereka
ssmereka / README.md
Last active May 27, 2021 14:47
Installing Cassandra on Mac: A Quick Guide

Install Cassandra on Mac

  1. Install most recent version of Java. Install homebrew if you don't already have it.

    brew install java
    
  2. Grab a link to the most recent version of Cassandra from their download page.

@bdwyertech
bdwyertech / vmware_fusion_reset_networking.sh
Last active December 8, 2021 10:24
VMWare Fusion - Reset Networking
#!/bin/bash
# Reset VMware Fusion Networking
# Clear out the Configuration
sudo rm -f /Library/Preferences/VMware\ Fusion/networking*
sudo rm -f /Library/Preferences/VMware\ Fusion/*location*
sudo rm -rf /Library/Preferences/VMware\ Fusion/vmnet*
sudo rm -rf /var/db/vmware/vmnet-dhcpd-vmnet*
# Reconfigure Networking
@octopitus
octopitus / expression.go
Last active February 15, 2022 10:39
Simple Infix to Postfix conversion in Golang using stack.
package main
import (
"strings"
)
func IsOperator(c uint8) bool {
return strings.ContainsAny(string(c), "+ & - & * & /")
}
@didip
didip / docker-builder.sh
Last active May 7, 2022 19:42
Small helper script that automates Docker building and pushing
#!/bin/bash
set -ex
PARENT_DIR=$(basename "${PWD%/*}")
CURRENT_DIR="${PWD##*/}"
IMAGE_NAME="$PARENT_DIR/$CURRENT_DIR"
TAG="${1}"
REGISTRY="hub.docker.com"
@markerikson
markerikson / redux-thunk-examples.js
Last active September 4, 2022 11:12
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}),
error => dispatch({type : "REQUEST_FAILED", error : error})
);