start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# www.fduran.com | |
# script that will send an email to EMAIL when disk use in partition PART is bigger than %MAX | |
# adapt these 3 parameters to your case | |
MAX=95 | |
[email protected] | |
PART=sda1 | |
USE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1` | |
if [ $USE -gt $MAX ]; then |
(* | |
AddCountryCode.scpt | |
===================== | |
Customization of Andreas Amann's script posted on https://discussions.apple.com/message/9169756#9169756 | |
Description | |
------------ |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Written on 2013-02-04 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
Check <https://gist.github.com/4707775> for newer versions. | |
Uses dnspython: install with `pip install dnspython3` | |
""" |
The regex patterns in this gist are intended only to match web URLs -- http, | |
https, and naked domains like "example.com". For a pattern that attempts to | |
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
# Single-line version: | |
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
/** | |
* get Instagram latest post. | |
* | |
* @params {object} args - | |
* @params {string} args.count - int | |
* @params {string} args.token - string, default: "12464375.5b9e1e6.2924280151d74a58a7e437a828decc37" | |
* @params {string} args.userId - string, default: "308301284" | |
* @params {string} args.tag - string, default: "slmf" | |
* @params {string} args.filter - string: "user" || "tags", default: "user" |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
#Courtesy | |
http://www.labnol.org/internet/direct-links-for-google-drive/28356/ | |
#get-shared-link | |
https://drive.google.com/file/d/FILE_ID/edit?usp=sharing | |
#convert-to-download-link | |
https://drive.google.com/uc?export=download&id=FILE_ID |
## GUAC INSTALL | |
yum update | |
yum install docker | |
systemctl start docker.service | |
docker run --name docker-postgres -v /some/path/on/host:/var/lib/postgresql/data -e POSTGRES_PASSWORD=PASSWORD_HERE -d postgres | |
docker run --rm glyptodon/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql | |
docker run -it --link docker-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres' | |
# Enter your postgresql password from line 5 | |
CREATE DATABASE guacamole_db; | |
\q |