Skip to content

Instantly share code, notes, and snippets.

View nickgrealy's full-sized avatar

Nick Grealy ⚡️ nickgrealy

View GitHub Profile
## Version 2018/12/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
# listening on port 80 disabled by default, remove the "#" signs to enable
# redirect all traffic to https
#server {
# listen 80;
# listen [::]:80;
# server_name _;
# return 301 https://$host$request_uri;
#}
@nickgrealy
nickgrealy / slack_emoticons_to_html_unicode.json
Created August 17, 2018 06:20
slack_emoticons_to_html_unicode.json
{
"+1": "👍",
"-1": "👎",
"100": "💯",
"1234": "🔢",
"8ball": "🎱",
"ab": "🆎",
"abc": "🔤",
"abcd": "🔡",
"accept": "🉑",
@nickgrealy
nickgrealy / responses.txt
Last active March 14, 2018 23:45
SamKnows - Security questions and answers
- Is my internet traffic monitored, or does the SamKnows whitebox only measure "it's own" internet usage?
The Whitebox measures only it's own internet usage by running speedtests, your own traffic is not used for the measurements.
We check the *volume* of traffic to ensure the line isn't in use, but never the content or destination of the traffic.
- Why do I need to plug my devices into the back of the SamKnows whitebox?
We require devices to be plugged into the back of the SamKnows whitebox in order to be certain that the line is idle when a check
is scheduled to run. If you are using the internet and the amount of traffic flowing through the whitebox is above a certain
threshold, our scheduled tests can be delayed or cancelled in order to prevent us interfering with your usage, and to prevent us
recording results that are lower than they should be. We call this "cross-traffic detection", and if devices are connected to the
@nickgrealy
nickgrealy / Array.forEach.js
Created March 4, 2018 02:58
IE11 Polyfills
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.io/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback/*, thisArg*/) {
var T, k;
if (this == null) {
throw new TypeError('this is null or not defined');
@nickgrealy
nickgrealy / ie-polyfill.js
Created March 4, 2018 02:42
IE11 Polyfill
// https://gist.github.com/eirikbacker/2864711
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
@nickgrealy
nickgrealy / git.sh
Created February 15, 2017 13:03
A git command for working with multiple subdirectories.
#!/bin/sh
#
# N.B. doesn't work for interactive scripts like "git diff" (instead use "git diff --exit-code").
#
# Perform git operation on all git directories...
/usr/bin/find . -name .git -prune -execdir bash -c "echo -e '\033[0;35m---------\033[0m'" \; -execdir pwd \; -execdir git "$@" \;
@nickgrealy
nickgrealy / URIBuilderTests.groovy
Created December 16, 2016 05:12
URI Builder Tests - comparing different implementations.
@Grab('javax:javaee-api:7.0')
@Grab('org.glassfish.jersey.core:jersey-common:2.22.2')
@Grab('org.apache.httpcomponents:httpclient:4.5.2')
@Grab('org.springframework:spring-web:4.2.5.RELEASE')
import java.net.URI;
import javax.ws.rs.core.UriBuilder;
import org.apache.http.client.utils.URIBuilder;
import org.springframework.web.util.UriComponentsBuilder;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
import java.util.HashSet;
import java.util.Set;
@nickgrealy
nickgrealy / server.cfg
Last active January 22, 2017 11:32
CSS Config
hostname "--== My Awesome Server ==--
mp_timelimit 20
mp_winlimit 10
mp_maxrounds 10
mp_roundtime 7
mp_autoteambalance 1
//Set to min # of bots allowed on server
bot_quota 16
@nickgrealy
nickgrealy / 1_README.md
Last active April 29, 2023 03:39
Steam > Counter-Strike: Source - Windows Dedicated Server setup - 2016

Last Updated: 1st April, 2016

Steam > Counter-Strike: Source

Windows Dedicated Server setup

Installation / Updating / Running a Server

  1. Download and unzip https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip (link is legit, it's referenced here on Valve's instructions) to the Steam home directory (e.g. C:\Program Files (x86)\Steam\steamapps\common\steamcmd)
  2. Execute the install_update_run_server.bat batch script (below). It will download and install the server, then run the server in a new window on port 27015.