Skip to content

Instantly share code, notes, and snippets.

@suvene
suvene / gist:2eb7c76841cce8d8e79c
Created September 19, 2014 17:13
HomebrewでエラーになるのでMonoをごっそり消す - nabetama's blog
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
function spderSubmit(formName, method, action, controllerResourceName, subsystemName) {
openLayer();
var pathNames = (location.pathname + '/').split('/');
if (method == undefined) {
method = 'get';
}
if (subsystemName == undefined) {
subsystemName = pathNames[1];
function formatMicrotime($time, $format = null){
if (is_null($format)) {
$formated = sprintf('%0.5f', $time);
} else {
$sec = (int)$time;
$msec = (int)(($time - $sec) * 100000);
$formated = date($format, $sec) . '.' . $msec;
}
return $formated;
}
@suvene
suvene / 0_reuse_code.js
Created December 20, 2013 17:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#container, #content {
width: 1640px !important;
margin-left: -10px;
}
#left_column {
width: 1280px !important;
}
.#right_column {
@suvene
suvene / gist:5832775
Created June 21, 2013 17:18
centos check priorities
sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n
$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 7 20:22:46 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: <your username here>
Enter password: <your password here>
Connected to:
<?php
/** ClassLoader
*
* Based on SplClassLoader by PHP Standards Working Grounp
* <http://groups.google.com/group/php-standards/web/final-proposal>
*
* @author Sotaro Karasawa <[email protected]>
* @date 2010-12-02 18:59:39
*/
@suvene
suvene / git-間違って削除したstashを戻す.mkd
Last active April 1, 2017 02:22
[git]間違って削除したstashを戻す
git fsck --unreachable | grep commit | cut -d\  -f3 | xargs git log --merges --no-walk --grep=WIP
git cherry-pick -n -m1 <SHA-1>