npm list -g --depth=0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Twitch.tv extension v0.0.2 by Stefan Sundin | |
https://gist.github.com/stefansundin/c200324149bb00001fef5a252a120fc2 | |
The only thing that this extension does is to act as a helper to seek to the | |
correct time when you open a twitch.tv url that contains a timestamp. | |
You must have the playlist parser installed as well! | |
Usage: | |
1. Install the playlist parser: https://addons.videolan.org/p/1167220/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function throttle(callback, wait, immediate = false) { | |
let timeout = null | |
let initialCall = true | |
return function() { | |
const callNow = immediate && initialCall | |
const next = () => { | |
callback.apply(this, arguments) | |
timeout = null | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
set -e | |
# https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean | |
DESTINATION_IP=$1 | |
shift || (echo "E: Destination IP is not provided. Aborting"; exit 1) | |
ANCHOR_GW=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@plex ~]# cat /etc/systemd/system/[email protected] | |
[Unit] | |
Description=Minecraft Server %i | |
[Service] | |
WorkingDirectory=/opt/minecraft-%i | |
User=mcserver | |
Type=forking | |
ExecStart=/usr/bin/tmux new-session -s mc-%i -d '/bin/java -Xmx2048M -jar minecraft_server.jar nogui' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AUTHOR: Dev_Richard (https://www.spigotmc.org/members/dev_richard.38792/) | |
DESC: A simple and easy to use class that can get and set a player's total experience points. | |
Feel free to use this class in both public and private plugins, however if you release your | |
plugin please link to this gist publicly so that others can contribute and benefit from it. | |
*/ | |
import java.math.BigDecimal; | |
import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* TrigCalculator by Tarun Boddupalli | |
* <p/> | |
* The MIT License (MIT) | |
* <p/> | |
* Copyright (c) 2015 Tarun Boddupalli | |
* <p/> | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
{ | |
echo $(date) | |
echo ">>>Disk found" | |
echo ">>>Setting the title..." | |
title=$(makemkvcon -r info) | |
title=`echo "$title" | grep "DRV:0\+"` | |
title=${title:53} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
If you actually want to use this in a live project (please don't), add the following to your HTML: | |
<!--[if lt IE 9 ]> | |
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script src="zalgo.js"></script> | |
<![endif]--> | |
*/ |