start new:
tmux
start new with session name:
tmux new -s myname
var x,y; | |
document.onmousemove = function(e){ | |
e = e || window.event; | |
x = e.clientX; | |
y = e.clientY; | |
}; | |
function elementAtMousePosition() { | |
return document.elementFromPoint(x,y); |
<?php | |
/** | |
* imap-attachment.php | |
* | |
* @author hakre <hakre.wordpress.com> | |
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php | |
*/ | |
/** | |
* Utility Class |
現在 github 有提出一系列對學生的優惠服務 詳情請點這裡
只要你是學生(擁有內含edu的信箱 ex:XXXXXX@mail.nchu.edu.tw)
如果你是學生又是黑客的話,就讓我們來申請吧!
<?php | |
function json_response($code = 200, $message = null) | |
{ | |
// clear the old headers | |
header_remove(); | |
// set the actual code | |
http_response_code($code); | |
// set the header to make sure cache is forced | |
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |
/* ES6/ES2015 classes */ | |
class A { | |
constructor() { | |
this.a = 10 | |
} | |
print() { | |
console.log(this.a, this.b) | |
} | |
} |
git log --oneline -1 <PR-BRANCH>
git push -f origin :
#! /usr/bin/env python3 | |
"""Fixing bluetooth stereo headphone/headset problem in debian distros. | |
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197 | |
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone. | |
This will be only fixes the bluez5 problem mentioned above . | |
Licence: Freeware |