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 | |
# | |
# Show replication lag for one or more postgresql slaves in streaming replication. | |
# | |
# dsimmons@squiz.co.uk | |
# 2012-01-09 | |
# | |
psql="which psql" | |
psql_extra_opts="" |
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
<html> | |
<head> | |
</head> | |
<body> | |
<ul id="links"> | |
<li><a href="http://sega.co.jp/">SEGA</a></li> | |
<li><a href="http://www.yahoo.com/">Yahoo!</a></li> | |
</ul> | |
<a href="#" onclick="openAll();return false;">Click here</a> |
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
window.onload = function() { | |
if(document.body.addEventListener) { | |
document.body.addEventListener('mouseover', onMouseOverHandler, false); | |
document.body.addEventListener('mouseout', onMouseOutHandler, false); | |
} else { | |
document.body.attachEvent('onmouseover', onMouseOverHandler); | |
document.body.attachEvent('onmouseout', onMouseOutHandler); | |
} | |
function switchImage(e, o) { |
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
/* Fallback */ | |
background-color: rgb(0, 0, 0); | |
/* Modern browsers */ | |
background-color: rgba(0, 0, 0, 0.6); | |
/* IE 6, 7 */ | |
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); | |
/* IE 8 */ |
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
[client] | |
default-character-set=utf8 | |
[mysql] | |
default-character-set=utf8 | |
[mysqld] | |
collation-server = utf8_unicode_ci | |
init-connect='SET NAMES utf8' |
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 | |
$data = file_get_contents('/Users/socana/Desktop/request.txt'); | |
$rsc = curl_init(); | |
curl_setopt($rsc, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); | |
curl_setopt($rsc, CURLOPT_URL, "http://demo.optimizr.eu:8080/OptimizrAnalysis/analyze"); | |
curl_setopt($rsc, CURLOPT_POST, true); | |
curl_setopt($rsc, CURLOPT_POSTFIELDS, $data); | |
curl_setopt($rsc, CURLOPT_RETURNTRANSFER, true); |
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/php | |
<?php | |
define('GOAL', 30); | |
function fibonacciV1($n = 0) { | |
if(!$n) : return 0; | |
elseif ($n < 3) : return 1; | |
else : return fibonacciV1($n-1) + fibonacciV1($n-2);. | |
endif; |
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
env GIT_SSL_NO_VERIFY=true git clone https://··· |
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
### Keybase proof | |
I hereby claim: | |
* I am okiwan on github. | |
* I am okiwan (https://keybase.io/okiwan) on keybase. | |
* I have a public key whose fingerprint is 16A1 181C 8A6F A81E 5310 068D B973 2D62 46D4 F9AE | |
To claim this, I am signing this object: |
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 | |
# | |
# Tomcat 8 start/stop/status init.d script | |
# Initially forked from: https://gist.github.com/valotas/1000094 | |
# @author: Miglen Evlogiev <bash@miglen.com> | |
# | |
# Release updates: | |
# Updated method for gathering pid of the current proccess | |
# Added usage of CATALINA_BASE | |
# Added coloring and additional status |
OlderNewer