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
# | |
# mosquitto birdge client config | |
# | |
#name of master mosquitto | |
connection main | |
#address of master mosquitto | |
address 127.0.0.1 | |
start_type automatic | |
#id of master mosquitto (any id is accepted) | |
clientid m-br |
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
tun-mtu 6000 | |
fragment 0 | |
mssfix 0 | |
cipher aes-256-cbc |
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 | |
// LDAP variables | |
$ldaphost = ""; // your ldap servers | |
$ldapport = 389; // your ldap server's port number | |
// Connecting to LDAP | |
$ldapconn = ldap_connect($ldaphost, $ldapport) | |
or die("Could not connect to $ldaphost"); | |
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3); | |
if ($ldapconn) { |
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
# ~/.tmuxinator/general.yml | |
name: general | |
root: ~/ | |
# Optional tmux socket | |
# socket_name: foo | |
# Runs before everything. Use it to start daemons etc. | |
# pre: sudo /etc/rc.d/mysqld start |
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
-- get screen resolution | |
-- Finder method does not work with 10.11 | |
set screenWidth to (do shell script "system_profiler SPDisplaysDataType | awk '/Resolution/{print $2}'") | |
set screenHeight to (do shell script "system_profiler SPDisplaysDataType | awk '/Resolution/{print $4}'") | |
-- Kill old iTerm2 | |
-- added exit 0 to by pass error code when process did not exist. | |
do shell script "killall -9 iTerm2; exit 0" | |
-- get dock size |
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
def textile_to_markdown(textile) | |
d = [] | |
pre = false | |
table_header = false | |
text_line = false | |
textile.each_line do |s| | |
s.chomp! |
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
#Assuming module foo with method bar: | |
import foo | |
methodToCall = getattr(foo, 'bar') | |
result = methodToCall() | |
#As far as that goes, lines 2 and 3 can be compressed to: | |
result = getattr(foo, 'bar')() | |
#https://stackoverflow.com/questions/3061/calling-a-function-of-a-module-from-a-string-with-the-functions-name-in-python |
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
altscreen on | |
term screen-256color | |
bind ',' prev | |
bind '.' next | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}%-Lw%{= kW}%50> %n%f* %t%{= kG}%+Lw%< %{= kG}%-=%c:%s%{-}' |
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
import tgl | |
import os | |
# This is a python script that run with tg and notify when get new message | |
# Using terminal-notifier https://github.com/julienXX/terminal-notifier | |
# The notifier function | |
def notify(title, subtitle, message): | |
t = '-title "%s"' % title | |
s = '-subtitle "%s"' % subtitle |
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
deb http://debian.xtdv.net/debian/ wheezy main contrib non-free |
OlderNewer