Skip to content

Instantly share code, notes, and snippets.


Alexis Tyler OmgImAlexis

Block or report user

Report or block OmgImAlexis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View minimal-analytics-snippet.js
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
hongkongkiwi /
Created Nov 23, 2017
Small script to setup ssh keys and configs on Unraid to persist after boot. Supports multiple users.
# Add this line into /boot/config/go where username is the user you want to setup, probably root
#/boot/config/ssh/ "username"
if [[ "$1" == "" ]]; then
echo "Invalid User!"
exit 1
ncochard /
Last active Nov 13, 2019
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
View Fix-SR-Install
source ~/.bash_profile
cd ~/"Apps/SickRage"
git remote set-url origin
git remote set-branches --add origin master
git remote update
git fetch origin
git checkout master
git branch --set-upstream-to origin/master
git reset --hard origin/master
slavafomin /
Last active Nov 11, 2019
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors


rmoorman /
Created Jul 30, 2016
.babelrc vs webpack babel-loader configuration

Either you use .babelrc to specify environment specific settings (plugins or transforms for example) using the env key:

  "presets": ["es2015", "stage-0", "react"],
  "env": {
    "development": {
      "plugins": [
rmkpatchaa /
Last active Nov 11, 2019
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click)

  2. Use one tab to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

martndemus / .travis.yml
Last active Sep 10, 2016
When you don't want to test with PhantomJS on Travis-CI...
View .travis.yml
language: node_js
- "stable"
dist: trusty
sudo: required
vannmangel / Remove-SkypeAds.ps1
Last active Jan 12, 2017
Remove ads in skype
View Remove-SkypeAds.ps1
# start as admin!
# prompt for username
$SkypeUserName = Read-Host -Prompt "What is your Skype username?"
# stop skype-process
if(Get-Process | ? {$_.Name -like 'skype'}) {Stop-Process -Name skype}
# commit changes to hosts file
$hostfile = "C:\Windows\System32\Drivers\etc\hosts"
Vestride /
Last active Nov 12, 2019
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
You can’t perform that action at this time.