Skip to content

Instantly share code, notes, and snippets.

@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active December 3, 2024 21:48
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
@aljiwala
aljiwala / Awesome_GO.md
Created March 24, 2017 14:59
Awesomeness of Golang by uhub

#awesome-go

A curated list of awesome Go frameworks, libraries and software.

@vasanthk
vasanthk / System Design.md
Last active May 23, 2025 11:41
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?
@matthewsullivan-wf
matthewsullivan-wf / python_logs_in_json.py
Last active March 20, 2017 12:57
Format Python logs to output as JSON for easy ingestion into Splunk
# Getting started:
# pip install python-json-logger
# settings.py
import os
LOG_LEVEL = os.getenv('LOG_LEVEL', 'INFO')
LOGGING = {
@FUT
FUT / install-redis.sh
Last active March 2, 2025 12:35
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 22, 2025 14:34
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

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 j

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@wellercs
wellercs / cf_IsNullFormat
Created July 27, 2012 23:01
Easy method for setting cfqueryparam null attribute
<cfcomponent name="utilities" output="false" hint="I provide various utility functionality">
<cffunction name="init" access="public" returntype="any" output="false" hint="Initializes the Service">
<cfreturn this />
</cffunction>
<cffunction name="isNullFormat" access="remote" returntype="any" output="false" hint="I return whether something is null">
<cfargument name="input" type="any" required="true" />
<cfset var inputdatatype = "">
<cftry>
@smrchy
smrchy / example.cfm
Created September 16, 2011 19:55
queryToObject
<!--- suppose your query you did with cfquery is stored in the variable myQuery --->
<script>
var q = #SerialzeJSON(myQuery,true)#;
// make an easy to use object
var newQuery = queryToObject(q);
console.log(newQuery);
</script>
#!/opt/python2.7/bin/python
# -*- coding: utf-8 -*-
# Author: Ricardo Garcia Gonzalez
# Author: Danny Colligan
# Author: Benjamin Johnson
# Author: Vasyl' Vavrychuk
# Author: Witold Baryluk
# Author: Paweł Paprota
# License: Public domain code
import cookielib