Skip to content

Instantly share code, notes, and snippets.

View skellertor's full-sized avatar
🫡

Samuela Keller skellertor

🫡
View GitHub Profile
@skellertor
skellertor / any_subfolder.md
Created October 18, 2015 18:13
gulp syntax for any subfolder
gulp.src('src/**/*.js);
@skellertor
skellertor / custom_gulp_tasks.md
Last active October 18, 2015 08:45
Custom gulp tasks

Gulp task to replace the src attribute of an html script element so the browser doesn't cache it.

var replace = require('gulp-replace');

function cache_version() {
    return (Math.floor((Math.random() * 1000) + 1)).toString(); 
}

gulp.task('version', function () {
@skellertor
skellertor / useful_regexes.md
Last active October 18, 2015 17:53
A compilation of useful regexes

Regex for html script tags src attribute

/src(\s)*=(\s)*["'][\S]*(\.)js/g

Regex for html link tags href attribute

/href(\s)*=(\s)*["'][\S]*(\.)css/g
byte[] emojiBytes = new byte[]{(byte)0xF0, (byte)0x9F, (byte)0x98, (byte)0x81};
String emojiAsString = new String(emojiBytes, Charset.forName("UTF-8"));
@skellertor
skellertor / hot_key.md
Last active September 26, 2015 04:06
Mac OSX hot keys that will make you more productive

Mac OSX hot key combos that will make you more productive

First off you need to know the key symbols associated with each key ☀️

Special Mac Keys 🍎

Key name Key symbol
command
shift
option/alt
control
@skellertor
skellertor / a_splash_of_color.md
Created September 25, 2015 00:42
Customize your terminal on an *nix based system

Customization of your favorite command line interface (CLI)

@skellertor
skellertor / testAngularCtrl.md
Last active September 25, 2015 00:08
Set up test framework with jsTestDriver as runner, jasmine.js as assert engine, and angular-mocks.js

Test angular controller with jasmine.js as assert engine and jsTestDriver as test runner

@skellertor
skellertor / SublimeSML.md
Last active October 7, 2019 12:12
Install SublimeREPL for SML

💻 💻 💻 💻 💻 💻 💻 💻 💻 💻 💻 SublimeREPL for SML 💻 💻 💻 💻 💻 💻 💻 💻 💻 💻 💻

This tutorial assumes you already have Sublime text editor with Package Control installed as well as smlnj installed. Complete the installations with the links provided before continuing if you haven't already done so. 👌

  • Open Sublime and go to Preferences > Browse packages
  • Browse to the folder User inside the packages folder
  • Create a folder called SML
  • Inside the newly created SML folder, create two files 📄
    • Default.sublime-commands
@skellertor
skellertor / jar.md
Last active September 18, 2015 06:38
Working with jar files
/* Create a JAR file from files */

jar cf jar-file.jar input-file(s)

Options ☕

  • c: indicates you want to create a JAR file
  • f: indicates you want to direct output to a file rather than stdout
@skellertor
skellertor / tarball.md
Last active September 18, 2015 06:11
*nix commands for working with tar files
# Tarball and compress entire directory

📁 tar -zcvf archive-name.tar.gz directory-name

# Tarball and compress files individually