Skip to content

Instantly share code, notes, and snippets.

@aln787
aln787 / http_get.go
Created January 17, 2015 15:31
Go Lang HTTP Get Example
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func checkErr(e error) {
if e != nil {
@aln787
aln787 / findFilesWithExtension.go
Last active January 20, 2023 22:05
Go Lang find files with extension from the current working directory.
/* Go Lang find files with extension from the current working directory.
Copyright (c) 2010-2014 Alex Niderberg */
package main
import (
"fmt"
"os"
"path/filepath"
"regexp"
@aln787
aln787 / asymmetric.go
Last active August 29, 2015 14:15 — forked from cryptix/LICENSE
package main
// using asymmetric crypto/RSA keys
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
@aln787
aln787 / GIF-Screencast-OSX.md
Last active July 18, 2016 13:09 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@aln787
aln787 / android_instructions.md
Last active May 5, 2018 13:58 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@aln787
aln787 / Transfer_README.md
Created December 17, 2018 12:46
File Transfer Commands

File Transfer Commands

  • time sudo tar -czvf TimeMachine_archive.tar.gz /Volumes/TimeMachine

  • time sudo rsync -azhP <source> <destination>

  • time sudo tar -xzvf TimeMachine_archive.tar.gz -C .

@aln787
aln787 / Directory_File_Renaming_README.md
Last active December 17, 2018 12:56
Photo Renaming Commands

Photo Renaming Commands

Commonly Used Commands:

  • find *.jpg | while read i; do echo $i && mv "$i" "${i// /_}"; done
  • find *.jpg | while read i; do nn=$(echo $i | tr "'" "-") && echo $nn && mv "$i" "$nn"; done
  • find *.jpg | while read i; do echo $i &amp;&amp; mv {,StudyAbroadAmsterdam-}${i}; done
  • mv ./* .. && ls && cd ..
#https://hub.mybinder.org/lab/user/jupyterlab-jupyterlab-demo-whkn85a9
import pandas as pd
from io import StringIO
cabin_data = StringIO("""CABIN NAME,WHERE LOCATED,CABIN TYPE,PETS ALLOWED,MAXIMUM CAPACITY,PATC MAP,# MILES FROM D.C.,HIKE-IN DISTANCE,DISTANCE TO THE AT,PER NIGHT RATE THU/FRI/SAT,PER NIGHT RATE SUN - WED,PER NIGHT RATE ADVANCED RENTAL,PATC Membership Required,Available
Anna Michener,Pennsylvania,Primitive,yes,14,2-3,105,1 mile,0.3 mile,$50.00,$35.00,$100/$70,no,no
Argow Cabin,Virginia,Primitive,yes,8,11,120,1 mile,1 mile,$55.00,$40.00,$110/$80,yes,no
Bear Spring,Maryland,Primitive,yes,6,5-6,59,0.4 mile,0.8 mile,$50.00,$35.00,$100/$70,no,yes
Bears Den Cottage,Virginia,Semi-Primitive,yes,8,8,56,0.3 mile,300 feet,$75.00,$50.00,$150/$100,no,yes
Blackburn Tr. Ctr.,Virginia,Semi-Primitive,no,22,7,50,none,0.2 mile,$140.00*,$80.00*,$280/$160*,yes,yes
Catoctin Hollow Lodge,Maryland,Modern,no,8,5-6,65,0.7 miles,N/A,$140.00,$80.00,$280/$160,no,yes