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 | |
#Script to sync git repo with s3, only changed files are uploaded | |
#Depends on the s3cmd utility, runs git diff ONLY with the previous repo HEAD. | |
#Include script into the git repo root directory, ensure it is executable | |
# | |
#To add a convienient alias defined the below in .git/config | |
#[alias] | |
#push-s3 = "!$(pwd)/s3-sync.py" | |
#push-both = "!git push && git push-s3" | |
# |
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
#A mysql host/group should define either the 'percona_mysql' or 'vanilla_mysql' to true, | |
#this tells the play which mysql variant should be installed. | |
--- | |
#apt_expects the exact url to the key, the url can be found by searching for the id at http://keyserver.ubuntu.com/ | |
- name: add_percona_aptkeys | |
action: apt_key data="{{ lookup('file', '../files/percona.gpg') }}" ## id=1C4CBDCDCD2EFD2A url="http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1C4CBDCDCD2EFD2A" state=present ## apt_key module needs fixing to look up keys. | |
when: percona_mysql is defined | |
tags: | |
- mysql | |
- add_percona_aptkeys |
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
pname=window.location.hostname;c=document.getElementById('padtable');items=c.getElementsByTagName('a');for (i=2;i<items.length;i++){s=items[i].toString().split(/\//).pop(); url='http://' + pname +'/ep/pad/export/' + s + '/latest?format=txt';document.write('<a href='+ url +'>'+url+'</a><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
--- a/functions.h 2014-10-17 13:54:38.436185512 +0800 | |
+++ b/functions.h 2014-10-17 13:57:38.742969851 +0800 | |
@@ -150,6 +150,7 @@ | |
{ "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, | |
{ "display-message", OP_DISPLAY_MESSAGE, M_ENTER_S }, | |
{ "buffy-list", OP_BUFFY_LIST, "." }, | |
+ { "buffy-refresh", OP_BUFFY_REFRESH, "`"}, | |
{ "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" }, | |
{ "display-address", OP_DISPLAY_ADDRESS, "@" }, | |
{ "pipe-message", OP_PIPE, "|" }, |
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
sub find_prereqs { | |
my($self, $dist) = @_; | |
my @deps = $self->extract_meta_prereqs($dist); | |
if ($dist->{module} =~ /^Bundle::/i) { | |
push @deps, $self->bundle_deps($dist); | |
} | |
if ($self->{cpanfile_requirements} && !$dist->{cpanfile}) { |
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
$ cat /tmp/j.java | |
@Override | |
protected Integer doInBackground(byte[]...arr) { | |
byte[] fft = arr[0]; | |
int[] bands = new int[50]; | |
int[] mag = new int[100]; |
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 iter_fetch(l=[], c=5): | |
''' | |
given a list, yield c number | |
of items at a time. | |
''' | |
end=0 | |
start=0 | |
while True: | |
if (end + c) >= len(l)-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
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
const char* ssid = "fridge"; | |
const char* password = "fridge"; | |
ESP8266WebServer server(80); | |
void handle_root() { |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
SleekXMPP: The Sleek XMPP Library | |
Copyright (C) 2010 Nathanael C. Fritz | |
This file is part of SleekXMPP. | |
See the file LICENSE for copying permission. | |
""" |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
SleekXMPP: The Sleek XMPP Library | |
Copyright (C) 2010 Nathanael C. Fritz | |
This file is part of SleekXMPP. | |
See the file LICENSE for copying permission. | |
""" |
OlderNewer