Skip to content

Instantly share code, notes, and snippets.

View chrisl8888's full-sized avatar
πŸ’­
🏈

Chris Lee chrisl8888

πŸ’­
🏈
View GitHub Profile
@chrisl8888
chrisl8888 / install.sh
Last active August 8, 2017 03:34
Installing keycloak RHEL/Centos on AWS EC2
#!/bin/bash
## Install Mysql
yum install mysql-server
service mysql-start
grep 'Temporary Password'
@chrisl8888
chrisl8888 / package.json
Created September 2, 2016 15:06
jsdocs setup in package.json
{
"name": "MyProject",
"scripts": {
"docs": "./node_modules/.bin/jsdoc src -r -d docs"
}
}
@chrisl8888
chrisl8888 / phprc
Created August 7, 2016 05:46 — forked from amnuts/phprc
Dreamhost PHP 5.6 phprc file
date.timezone = "Europe/London"
expose_php = 0
extension = phar.so
extension = fileinfo.so
extension = intl.so
suhosin.executor.include.whitelist = phar
[opcache]
zend_extension=opcache.so
@chrisl8888
chrisl8888 / simple-mail-script.php
Created August 4, 2016 02:42
Simple mail test script
<?php
$to = "[email protected]"; // REPLACE
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
@chrisl8888
chrisl8888 / testing-es2015-constants.js
Last active June 16, 2016 16:35
ES 2015 constants - overriding constants inside another function
console.log('outside', test);
(() => {
const test = 2;
console.log('inside', test);
return test
})();
@chrisl8888
chrisl8888 / open-chrome.sh
Last active June 27, 2017 00:24
open chrome and disable web security
#!/usr/bin
open -a Google\ Chrome --args --disable-web-security --user-data-dir
@chrisl8888
chrisl8888 / delete-feature-branches.sh
Last active March 30, 2022 21:51
Delete feature branch with prefix locally then remove all remote feature branches
# Stole from:
# http://stackoverflow.com/questions/32122784/alias-script-to-delete-all-local-and-remote-git-branches-with-a-specific-prefix
git branch -D $(printf "%s\n" $(git branch) | grep 'feature/')
# Or this will work too to remove all remote branches:
# https://coderwall.com/p/eis0ba/remove-a-thousand-stale-remote-branches-on-git
git branch -r | awk -F/ '/\/feature/{print $2}' | xargs -I {} git push origin :{}
# Prune all origin branches
git remote prune origin
@chrisl8888
chrisl8888 / delete-feature.sh
Created March 30, 2016 22:26
Delete branch with prefix
git branch -D `git branch | grep 'feature/*'`
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true