Skip to content

Instantly share code, notes, and snippets.

Chris Howey howeyc

Block or report user

Report or block howeyc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@howeyc
howeyc / GitHub-Forking.md
Last active Oct 22, 2018 — forked from Chaser324/GitHub-Forking.md
Fork & Pull Request Workflow
View GitHub-Forking.md

Git Forking Process

Right now the process has references to GitHub as it has been taken from a GitHub open source tutorial. This will be updated with references to our own local gitea instance once it has been setup.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or just head straight to the command line:

# Clone your fork to your local machine
View keybase.md

Keybase proof

I hereby claim:

  • I am howeyc on github.
  • I am howeyc (https://keybase.io/howeyc) on keybase.
  • I have a public key whose fingerprint is 98D9 FC94 5C89 2216 376F 8E2D B96D 30AC D3C7 F8C3

To claim this, I am signing this object:

@howeyc
howeyc / s3size.go
Created May 24, 2015
Size of s3 bucket.
View s3size.go
// Get the size of a public s3 bucket.
//
// Relies on the directory listing being public.
//
// Example usage:
// s3size -bucket <bucketName>
//
package main
import (
"encoding/xml"
@howeyc
howeyc / s3dl.go
Created Nov 14, 2013
Download an s3 bucket.
View s3dl.go
// Download a public s3 bucket.
//
// Relies on the directory listing being public.
//
// Example usage:
// s3dl -bucket <bucketName>
//
// -> Will download all files in the "<bucketName>" s3 bucket
// to "<bucketName>" folder.
package main
@howeyc
howeyc / fsnotify-additions.go
Created Oct 25, 2013
Additional OptionsWatcher interface. Didn't actually attempt to use, just an idea.
View fsnotify-additions.go
type FileNotification interface {
IsCreate() bool
IsDelete() bool
IsModify() bool
IsRename() bool
Path() string // relative path to the file
}
type OptionWatcher interface {
Close() error
@howeyc
howeyc / s3cp.go
Last active May 11, 2018
Golang - copy files to / from s3
View s3cp.go
// 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
@howeyc
howeyc / watchalldirs.go
Created Feb 12, 2013
Watch for created directories.
View watchalldirs.go
package main
import (
"log"
"os"
"path/filepath"
"github.com/howeyc/fsnotify"
)
@howeyc
howeyc / are-count-true.lisp
Created May 4, 2012
Lisp boolean m-of-n short circuiting
View are-count-true.lisp
; Inspired by http://symbo1ics.com/blog/?p=1352
(defmacro are-count-true (num first-arg &rest args)
"Short circuit boolean expressions, finding if NUM are true."
(cond ((not (numberp num)) (error "Count must be number!"))
((minusp num) (error "What does negative number mean?"))
((zerop num) t)
((> num (1+ (length args))) nil)
((= num 1) `(or ,first-arg ,@args))
((= num (1+ (length args))) `(and ,first-arg ,@args))
(t
@howeyc
howeyc / p1.lisp
Created Feb 11, 2012
Embedly Challenge (apply.embed.ly)
View p1.lisp
(defun list-to-n (n)
(loop for x from 1 to n
collect x))
(defun fac (n)
(reduce #'* (list-to-n n)))
(defun num-to-str (num)
(with-output-to-string (str)
(format str "~a" num)))
@howeyc
howeyc / Vigenere.lisp
Created Dec 14, 2011
Golden Ratio Challenge
View Vigenere.lisp
;;; Golden Ratio Challenge: http://1.61803398874.com/
;;; https://en.wikipedia.org/wiki/Vigenère_cipher
;;;
;;; This implements the Vigenere cipher to solve the problem with one addition:
;;; Numbers are translated to letters. By glancing over the wikipedia page
;;; it seems as though the encryption algorithm is meant only for letters.
;;;
;;; Copyright Chris Howey
;;; Released under the ISC License
;;;
You can’t perform that action at this time.