Skip to content

Instantly share code, notes, and snippets.

View skellertor's full-sized avatar
🫡

Samuela Keller skellertor

🫡
View GitHub Profile
@skellertor
skellertor / amazon_lamp.sh
Last active September 8, 2015 22:15
Shell script for setting up apache for amazon linux ec2 instance
#!/bin/bash
# Setting up LAMP stack amazon linux
# Install all updates without asking permission
sudo yum update -y
# Install the Apache web server, MySQL, and PHP software packages
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
@skellertor
skellertor / orderBy.js
Last active September 17, 2015 06:21
Angular 'orderBy' filter for objects with a nested property you want to order by.
// Create angular app
var app = angular.module('myApp');
// Create custom filter for objects
app.filter('orderObjectByNestedProperties', function() {
return function(items, field, innerField, reverse) {
var filtered = [];
angular.forEach(items, function(item) {
filtered.push(item);
});
@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
@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 / 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 / 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 / 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 / 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
byte[] emojiBytes = new byte[]{(byte)0xF0, (byte)0x9F, (byte)0x98, (byte)0x81};
String emojiAsString = new String(emojiBytes, Charset.forName("UTF-8"));
@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