All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.
# run command in the foreground
command
# run commend in the background
#include "stdafx.h" | |
#include <windows.h> | |
#include <Winbase.h> | |
#include <Wtsapi32.h> | |
#include <Userenv.h> | |
#include <malloc.h> | |
#pragma comment(lib, "Wtsapi32.lib") | |
#pragma comment(lib, "Userenv.lib") |
for file in *.svg; do inkscape --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb SelectionUnGroup --verb EditSelectAll --verb StrokeToPath --verb FileSave --verb FileQuit "$file";done |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
Start your rethinkdb instance with this flag:
--bind all
(or bind=all
in the configuration file for your instance)
Block external access to the web UI with these two commands:
sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP
sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT
Install nginx:
sudo apt-get install nginx
#This script requires ruby and the watir-webdriver gem (http://watirwebdriver.com/) | |
#When you enter a username, it will upvote all of their comments/posts | |
#You may get IP-banned | |
require 'watir-webdriver' | |
puts "Please enter a user" | |
user = gets | |
user.chomp! |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |