Skip to content

Instantly share code, notes, and snippets.

View thousandlemons's full-sized avatar
🌴
On vacation

Nathaniel thousandlemons

🌴
On vacation
  • California
View GitHub Profile
@thousandlemons
thousandlemons / load-jquery.js
Created October 27, 2018 03:06
load jquery
// Anonymous "self-invoking" function
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://code.jquery.com/jquery-3.3.1.min.js';
script.type = 'text/javascript';
script.onload = function() {
var $ = window.jQuery;
// Use $ here...
};
$(function() {
let titleDOM = $('th.reactable-th-question_title').children('strong');
let statusDOM = $('th.reactable-th-status');
let tableDOM = $('tbody.reactable-data');
let filtersDOM = $('div.filter-tag-bar');
let refresh = function(){
let count = $('tbody.reactable-data').children().length;
let acCount = $('tbody.reactable-data').find('td[value="ac"]').length;
@thousandlemons
thousandlemons / hide-href-values-and-enforce-link-colors-for-printing-with-jquery.md
Last active May 8, 2018 21:03
Hide href values and enforce link colors for printing with JQuery
@thousandlemons
thousandlemons / ssh-socks-proxy-mac.md
Last active July 31, 2019 18:55
macOS SSH Proxy on/off

How to use SSH Tunneling with Socks proxy on Mac

Disable networksetup sudo password

To prevent networksetup from asking for password in the terminal, add the following line to the bottom of /etc/sudoers, where <username> is the actual username that you are using on your mac.

<username> ALL=(root) NOPASSWD: /usr/sbin/networksetup

Or, if you wish to enter your password each time you need to turn on/off the proxy, just skip this step.

@thousandlemons
thousandlemons / how-to-fix-whatever-problem-related-to-locale.md
Created November 1, 2016 09:11
How to fix whatever problem related to Locale
@thousandlemons
thousandlemons / how-to-setup-shadowsocks-on-your-ubuntu-server.md
Last active November 20, 2021 00:14
How to setup Shadowsocks on your Ubuntu server
@thousandlemons
thousandlemons / how-to-setup-your-ubuntu-server-as-an-always-on-torrent-downloader.md
Created November 1, 2016 09:08
How to setup your Ubuntu server as an always-on torrent downloader

How to setup your Ubuntu server as an always-on torrent downloader

In this tutorial, we are going to install Aria2 on your Ubuntu server, and use Yaaw as the GUI.

First, ssh to your Ubuntu server, and do the following

$ sudo apt-get update
$ sudo apt-get install aria2
@thousandlemons
thousandlemons / how-to-connect-django-to-remote-mysql.md
Created November 1, 2016 09:06
How to Connect Django to Remote MySQL

How to Connect Django to Remote MySQL

==[ONLY for Ubuntu]== Install libmysqlclient-dev

$ sudo apt-get install libmysqlclient-dev

Install mysqlclient.

@thousandlemons
thousandlemons / how-to-install-mysql-server-on-ubuntu-and-enable-remote-access.md
Created November 1, 2016 09:05
How to Install MySQL Server on Ubuntu and Enable Remote Access

How to Install MySQL Server on Ubuntu and Enable Remote Access

Installation

Install MySQL

$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
@thousandlemons
thousandlemons / result.json
Last active January 4, 2017 12:12
The Light Bulb Problem
{
"off": 60,
"on": 90,
"size": 150
}