This file contains hidden or 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 fileinput | |
| import datetime | |
| import sys | |
| for line in fileinput.input(): | |
| try: | |
| d = {} | |
| l = line.rstrip().split(',') |
This file contains hidden or 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
| // ==UserScript== | |
| // @name gist edit height | |
| // @namespace https://gist.github.com/sugy/1016a3c2d1c9638c5938bf5284efa46d | |
| // @version 0.2 | |
| // @description make gist edit pages full height with the touch of a button | |
| // @author sugy | |
| // @grant none | |
| // @include https://gist.github.com/*/edit | |
| // ==/UserScript== |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| func main() { | |
| count := 10 | |
| for i := 0; i < count; i++ { | |
| fmt.Println("increment iterate") | |
| } |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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/perl | |
| # -*- perl -*- | |
| =encoding utf8 | |
| =head1 NAME | |
| mysql_ - Munin plugin to display misc MySQL server status | |
| =head1 APPLICABLE SYSTEMS |
This file contains hidden or 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
| //#!node | |
| function formatSlack(text) { | |
| return text.replace(/^(.+)\s(\[\d+:\d+ .+\])\s*\n(.+)\n*/gm, function (_, name, time, text) { | |
| return time + ' ' + name + ': ' + text + "\n"; | |
| }); | |
| } | |
| if (typeof module != "undefined") { |
This file contains hidden or 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 | |
| # Get current swap usage for all running processes | |
| # Erik Ljungstrom 27/05/2011 | |
| # Updated: 2013-11-13 Yuichiro Saito | |
| # Updated: 2015-07-21 Kazutoshi Sugiyama | |
| function get_swap_used { | |
| DIR=$1 | |
| PID=`echo $DIR | cut -d / -f 3` | |
| PROGNAME=`ps -p $PID -o comm --no-headers` |
This file contains hidden or 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
| /* | |
| queue-fix 1.4 | |
| by Eric Huss | |
| e-huss@netmeridian.com | |
| reconstructs qmail's queue | |
| */ | |
| #include <stdio.h> | |
| #include <sys/stat.h> | |
| #include <pwd.h> |
This file contains hidden or 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/perl -w | |
| ## http://rwmj.wordpress.com/2010/10/26/tip-find-the-ip-address-of-a-virtual-machine/ | |
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use XML::XPath; | |
| use XML::XPath::XMLParser; |
This file contains hidden or 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 <my_global.h> | |
| #include <mysql.h> | |
| int main(int argc, char **argv) | |
| { | |
| if (argc != 2){ | |
| printf("Input mysqld host.\n"); | |
| exit(1); | |
| } |
NewerOlder