Skip to content

Instantly share code, notes, and snippets.

Avatar

Ngoc Pham ngocphamm

View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active May 3, 2021
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@shpakovski
shpakovski / Makefile
Created Dec 12, 2018
Mac app notarization from the command line
View Makefile
.PHONY: notarize
SIGNING_CERTIFICATE := $(shell security find-certificate -Z -c "Developer ID Application:" | grep "SHA-1" | awk 'NF { print $$NF }')
TEAM_ID := $(shell security find-certificate -c "Developer ID Application:" | grep "alis" | awk 'NF { print $$NF }' | tr -d \(\)\")
EXPORT_PATH := $(XCS_ARCHIVE)/Submissions
BUNDLE_APP := $(EXPORT_PATH)/NewMacApp.app
BUNDLE_ZIP := $(EXPORT_PATH)/NewMacApp.zip
UPLOAD_INFO_PLIST := $(EXPORT_PATH)/UploadInfo.plist
REQUEST_INFO_PLIST := $(EXPORT_PATH)/RequestInfo.plist
AUDIT_INFO_JSON := $(EXPORT_PATH)/AuditInfo.json
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active May 6, 2021
A Ruby script for collecting phone record statistics from a Facebook user data dump
View facebook-contact-info-summary.rb
#! /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
@fasiha
fasiha / no-hackerrank.md
Last active Mar 16, 2021
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.
View no-hackerrank.md

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: recruitment@EmployerABC.com
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created Mar 30, 2016
Guard My Macbook When I'm Away
View guard-my-mabook-when-i-am-away.sh
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@ctechols
ctechols / compinit.zsh
Last active May 2, 2021
Speed up zsh compinit by only checking cache once a day.
View compinit.zsh
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active Jan 2, 2021
Laracasts PHPStorm theme.
View gist:f4a304232c1be6dbb4f8
@grappler
grappler / Gruntfile.js
Last active Oct 5, 2020
https://webtranslateit.com/en/docs/web_translate_it_client/ / http://docs.transifex.com/developer/client/ Run this command in the folder to install all of the files needed. `npm install --save-dev`
View Gruntfile.js
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
makepot: {
target: {
@alexandrevicenzi
alexandrevicenzi / HttpClientExtensions.cs
Created Feb 25, 2014
C# Post, Put and Patch as JSON async extensions
View HttpClientExtensions.cs
using System;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading.Tasks;
namespace MyProject.Extensions
{
public static class HttpClientEx
{
public const string MimeJson = "application/json";
@ahmozkya
ahmozkya / README.md
Last active Apr 29, 2021
Homebrew with DNSMasq + DNSCrypt-proxy (OpenDNS)
View README.md

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy