Skip to content

Instantly share code, notes, and snippets.

View revett's full-sized avatar
🌲

Charlie Revett revett

🌲
View GitHub Profile
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 19, 2024 09:23
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@hichihara
hichihara / exec.go
Created May 31, 2018 06:10
Golang exec command unit test
package main
import (
"fmt"
"os/exec"
"strconv"
"strings"
)
var execCommand = exec.Command
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@Integralist
Integralist / The Perfect Developer Qualities.md
Last active May 8, 2022 05:48
The Perfect Developer Qualities

For me the perfect developer (if there is such a person) has these qualities:

  • Friendly: is respected and liked by all they work with and are always approachable (even in times of stress)
  • Humble: has great humilty and is not driven by ego
  • Calm: doesn't get emotive within discussions (including discussions that are both in their favour and those that aren't)
  • Understanding: appreciates that business requirements do change regularly and that there are no perfect scenarios; so is able to adapt to problematic situations in the appropriate manner
  • Agile: recognises when they are potentially moving down a rabbit hole/time sink/yak shave and will successfully re-evaluate the situation and refocus their attention
  • Patient: appreciates that no dev is born equal and so varying soft/practical skills will be encountered
  • Experienced: has a wide ranging skill set with relevant practical experience and most importantly realises the fundamentals of simple code design and recognised patt
#!/bin/bash
# Variables
INPUT_VIDEO="./input.mov"
OVERLAY_VIDEO="./overlay.mov"
OUTPUT_VIDEO_FILENAME="output.mov"
OVERLAY_START="0"
# Delete existing output file if it exists
if [ -f $OUTPUT_VIDEO_FILENAME ]; then
@kitwalker12
kitwalker12 / .0-Rails-Tutum.md
Last active September 14, 2016 17:58
Dockerized Rails on Tutum (Passenger + HAProxy)

How to deploy rails in tutum as a production server behing HAproxy on Passenger

docker build -t 'my_image_name:latest' . && tutum image push my_image_name:latest

@guumaster
guumaster / 00-README.md
Last active January 23, 2023 15:48
How to upload a file with $.ajax to AWS S3 with a pre-signed url

Upload a file with $.ajax to AWS S3 with a pre-signed url

When you read about how to create and consume a pre-signed url on this guide, everything is really easy. You get your Postman and it works like a charm in the first run.

Then you open your browser, try your usual $.ajax() and send your PUT operation, and you hit the cold iced wall of AWS error message, a simple <Code>SignatureDoesNotMatch</Code> that will steal hours from your productivity.

So here I come to save you and give you a free working example of how to upload a file directly to AWS S3 from your browser. You are wellcome :).

/**
* This Google Sheets script keeps data in the specified column sorted any time
* the data changes.
*
* After much research, there wasn't an easy way to automatically keep a column
* sorted in Google Sheets, and creating a second sheet to act as a "view" to
* my primary one in order to achieve that was not an option. Instead, I
* created a script that watches for when a cell is edited and triggers
* an auto sort.
*
@trkrameshkumar
trkrameshkumar / db.go
Created September 6, 2015 07:19
Get get number of rows using sql in golang
package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
)
const (
DB_USER = "ramesh"
@darnould
darnould / gist:bc4120b36ecf667149e5
Last active August 29, 2015 14:14
Merging PRs from forks (using squash)

Squash-merging PRs from forks

This example uses PR #2. Replaces all instances of 2 with the ID you're looking to merge (using squash).

  • git checkout master
  • git fetch origin pull/2/head:2
  • git merge --squash 2
  • git commit
  • git push