Skip to content

Instantly share code, notes, and snippets.

View sparkbold's full-sized avatar

Trung Hoang sparkbold

View GitHub Profile
@onsails
onsails / .screenrc
Created October 31, 2011 16:59
My .screenrc
# GNU Screen configuration file
#
# Balaji S. Srinivasan <balajis_at_stanford_dot_edu>
# This file can be found at http://jinome.stanford.edu/stat366/unix/.screenrc
# Modified to play well with emacs, by moving Ctrl-A to Ctrl-T
# Modification of original files by Sven Guckes, Sarunas Vancevicius, and Mike Perry
# Sarunas Vancevicius original: http://www.redbrick.dcu.ie/~svan/configs/screenrc
# Mike Perry original: http://fscked.org/writings/225notes/unix/.screenrc
@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
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:

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@barbwiredmedia
barbwiredmedia / gulpfile.js
Last active July 14, 2021 07:39
Gulp File , sass, browser-sync, local development. Assumes folder structure /assets/styles/ & /assets/js/
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
gulp.task('sass', function () {
gulp.src('./assets/styles/**/*.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
@guptesp
guptesp / Save Attachments to Disk.scptd
Last active May 19, 2022 18:37
Applescript to save attachments from Outlook to disk
-- Save this file to ~/Library/Application Support/Microsoft/Office/Outlook Script Menu Items folder on your ma
tell application "Microsoft Outlook"
set totalSize to 0
set msgs to current messages
set myDocumentFolder to POSIX path of (path to documents folder as string)
set myAttachmentsFolder to myDocumentFolder & "Attachments"
tell application "Finder"
if not (exists myAttachmentsFolder) then
#make new folder at myDocumentFolder with properties {name:"Attachments"}
do shell script "mkdir -p " & quoted form of myAttachmentsFolder
@recca0120
recca0120 / Facebook.js
Created June 22, 2017 05:10
Facebook Promise Wrapper
'use strict';
export class Facebook {
getScript() {
return new Promise((resolve) => {
if (window.FB) {
resolve(window.FB);
}
const id = 'facebook-jssdk';
@wpscholar
wpscholar / .eslintignore
Last active March 14, 2022 10:21
Webpack 4 Config for WordPress plugin, theme, and block development
**/*.min.js
**/*.build.js
**/node_modules/**
**/vendor/**
build
coverage
cypress
node_modules
vendor