(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
#!/bin/bash | |
# | |
# script formats bonnie output and calls gnuplot to create a png graph | |
# of various bonnie parameters. | |
# | |
# feed script bonnie++ output - it will attempt to find the last line of bonnie output | |
# which is all it really cares about anyway | |
# | |
# eg: Using uid:65534, gid:65534. | |
# Writing a byte at a time...done |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.plist | |
defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist | |
sudo defaults delete /Library/Preferences/com.teamviewer.teamviewer9.plist | |
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.plist | |
rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist | |
sudo rm -f /Library/Preferences/com.teamviewer.teamviewer9.plist |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# | |
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
# | |
# Blocks IPs that makes too much accesses to the server | |
# | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
ignoreregex = |
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use Getopt::Std; | |
use YAML::XS; | |
use Net::DNSBL::Client; | |
my %runOptions=(); | |
getopts("q:", \%runOptions); |
#!/usr/bin/env node | |
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml. | |
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported. | |
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml | |
Preferences: | |
1. Preferences defined outside of the platform element will apply to all platforms | |
2. Preferences defined inside a platform element will apply only to the specified platform |
// Start from https://gist.github.com/iwek/7154578#file-csv-to-json-js | |
// and fix the issue with double quoted values | |
function csvTojs(csv) { | |
var lines=csv.split("\n"); | |
var result = []; | |
var headers = lines[0].split(","); | |
for(var i=1; i<lines.length; i++) { | |
var obj = {}; |
-- based on http://www.microshell.com/database/mysql/emulating-nextval-function-to-get-sequence-in-mysql/ | |
-- might be needed | |
-- SET GLOBAL log_bin_trust_function_creators = 1; | |
CREATE TABLE `sequence_data` ( | |
`sequence_name` varchar(100) NOT NULL, | |
`sequence_increment` int(11) unsigned NOT NULL DEFAULT 1, | |
`sequence_min_value` int(11) unsigned NOT NULL DEFAULT 1, | |
`sequence_max_value` bigint(20) unsigned NOT NULL DEFAULT 18446744073709551615, |