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
hongkongkiwi / setup_unraid_ssh.sh
Created Nov 23, 2017
Small script to setup ssh keys and configs on Unraid to persist after boot. Supports multiple users.
View setup_unraid_ssh.sh
#!/bin/bash
# Add this line into /boot/config/go where username is the user you want to setup, probably root
#/boot/config/ssh/setup_ssh_client.sh "username"
if [[ "$1" == "" ]]; then
echo "Invalid User!"
exit 1
fi
@ncochard
ncochard / babel-webpack.md
Last active Aug 8, 2019
The correct way to compile ES6 using babel...
View babel-webpack.md

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 Temp.sh
#!/usr/local/bin/bash
source ~/.bash_profile
cd ~/"Apps/SickRage"
git remote set-url origin https://donna.devices.wvvw.me/sickrage/sickrage.git
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
slavafomin / nodejs-custom-es6-errors.md
Last active Aug 9, 2019
Custom ES6 errors in Node.js
View nodejs-custom-es6-errors.md

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

errors/AppError.js

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

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": [
        ["transform-object-rest-spread"],
        ["transform-react-display-name"],
@rmkpatchaa
rmkpatchaa / README.md
Last active Jul 30, 2019
Bulk delete github repos
View README.md

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

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall 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
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
node_js:
- "stable"
dist: trusty
sudo: required
addons:
apt:
@vannmangel
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
try{
if(Get-Process | ? {$_.Name -like 'skype'}) {Stop-Process -Name skype}
# commit changes to hosts file
$hostfile = "C:\Windows\System32\Drivers\etc\hosts"
@Vestride
Vestride / encoding-video.md
Last active Aug 19, 2019
Encoding video for the web
View encoding-video.md

Encoding Video

Installing

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.