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
de.substyle("active-unselected", { | |
background_colour = "#ffffff", | |
-- | |
-- Ion dock module configuration | |
-- | |
-- Create a dock | |
mod_dock.create{ | |
-- Dock mode: embedded|floating | |
mode="floating", |
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/sh | |
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks | |
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html | |
# Cambodia (KH) | |
ufw deny from 114.134.184.0/21 to any port 22 | |
# Chinese (CN) IP addresses follow: | |
ufw deny from 1.192.0.0/13 to any port 22 | |
ufw deny from 1.202.0.0/15 to any port 22 |
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
<?php | |
if( php_sapi_name() !== 'cli' ) { | |
die("Meant to be run from command line.\n"); | |
} | |
// Modify this based on site domain | |
$_SERVER['HTTP_HOST'] = 'yoursite.com'; | |
define( 'WP_USE_THEMES', false ); | |
global $wp, $wp_query, $wp_the_query, $wp_rewrite, $wp_did_header; |
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 | |
wget -q https://github.com/atom/atom/releases/latest -O /tmp/latest | |
MATCHEDROW=$(awk -F '[<>]' '/href=".*atom-amd64.deb/' /tmp/latest) | |
LATEST=$(echo $MATCHEDROW | grep -o -P '(?<=href=").*(?=" rel)') | |
VER_LATEST=$(echo $MATCHEDROW | rev | cut -d"/" -f 2 | rev | sed 's/v//g') | |
VER_INST=$(dpkg -l atom | tail -n1 | tr -s ' ' | cut -d" " -f 3) | |
if [ "$VER_LATEST" != "$VER_INST" ]; then | |
wget --progress=bar -q "https://github.com/$LATEST" -O /tmp/atom-amd64.deb --show-progress | |
dpkg -i /tmp/atom-amd64.deb | |
echo "Atom has been update from $VER_LATEST to $VER_INST" |
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
--- | |
- hosts: | |
all | |
gather_facts: no | |
vars: | |
verbose: false | |
log_dir: "log/dist-upgrade/{{ inventory_hostname }}" | |
pre_tasks: | |
- block: | |
- setup: |
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
[gallery columns="1" ids="257972,257974,257975,257976,257979,257980,257981,257982,257983,257984,257985,257986,257987,257988,257989,257990,257991,257992,257993,257994,257995,257996,257997,257998,257999,258000,258001,258002,258003,258004,258005,258006,258007,258008"] |
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
#!/usr/bin/env python | |
# Usage: python tt2srt.py source.xml output.srt | |
# FROM: https://gist.github.com/adammw/915259 | |
from xml.dom.minidom import parse | |
import sys | |
def fixTime(time): | |
parts = time.split(':') | |
frames = int(parts[3]) # 00..24 |
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
AVAILABLE PLUGINS | |
----------------- | |
FallbackScsvPlugin | |
SessionResumptionPlugin | |
HeartbleedPlugin | |
OpenSslCipherSuitesPlugin |
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
#!/usr/bin/python | |
import os | |
import sys | |
import csv | |
import datetime | |
import time | |
import twitter | |
def test(): |
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 | |
recipient_email="" | |
recipient_gpg_pub_key="" | |
sender_gpg_pub_key="" | |
file="$(mktemp)" | |
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0 | |
/usr/sbin/logwatch --detail high > $file | |
test -s $file || exit 1 |