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
/** | |
* Disable Discovery or Quick & Toggle with dblClick | |
* | |
* by http://me2day.net/ssemi | |
*/ | |
function m2m_disable_discovery() { | |
jQuery('div.post_section').dblclick(function(){ | |
jQuery(this).toggleClass('discovery'); | |
}).removeClass('discovery'); | |
} |
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
import time | |
import sys | |
for i in range(5): | |
time.sleep(1) | |
sys.stdout.write("%d\n" % i) | |
sys.stdout.flush() |
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
nvm install v0.8.15 | |
nvm alias default v0.8.15 | |
nvm use default |
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
# 79328b2 - (master) update 5 (10 minutes ago) <Seonghwan Lee> | |
# d1a216d - update 4 (15 minutes ago) <Seonghwan Lee> | |
# 228c3ec - update 3 (15 minutes ago) <Seonghwan Lee> | |
| * 93c5cd1 - (HEAD, local) update 4 (11 minutes ago) <Seonghwan Lee | |
| * a4735b8 - update 3 (12 minutes ago) <Seonghwan Lee> | |
| * 124d2ad - Merge branch 'master' into local (12 minutes ago) <S | |
|/| | |
# | 31e5a9c - update 2 (15 minutes ago) <Seonghwan Lee> | |
# | ee51d80 - update 1 (16 minutes ago) <Seonghwan Lee> | |
| * 49a6d64 - update 2 (14 minutes ago) <Seonghwan Lee> |
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 <iostream> | |
#include <future> | |
#include <list> | |
// http://isocpp.org/blog/2013/07/what-is-stdpromise-stackoverflow | |
// g++ -std=c++0x -pthread test.cpp | |
// tested in gcc 4.6.3 | |
class OneTask { |
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
// http://stackoverflow.com/questions/2281739/automatically-adding-enter-exit-function-logs-to-a-project | |
#define KNRM "\x1B[0m" | |
#define KRED "\x1B[31m" | |
#define KGRN "\x1B[32m" | |
#define KYEL "\x1B[33m" | |
#define KBLU "\x1B[34m" | |
#define KMAG "\x1B[35m" | |
#define KCYN "\x1B[36m" | |
#define KWHT "\x1B[37m" |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<!-- $HOME/.config/font-manager/local.conf --> | |
<fontconfig> | |
<match> | |
<test name="family"> | |
<string>sans-serif</string> | |
</test> | |
<edit name="family" mode="prepend" binding="same"> |
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
bool exec(const std::string &cmd, std::string* out) | |
{ | |
FILE* pipe = popen(cmd.c_str(), "r"); | |
if (pipe == NULL) { | |
return false; | |
} | |
char buffer[2048]; | |
while (!feof(pipe)) { | |
if (fgets(buffer, sizeof(buffer), pipe) != NULL) { |
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
#define _findMapValue(container, key) (container.end() != find_if(container.begin(), container.end(), [](decltype(container)::value_type it) { return it.first == key; })) | |
// c++11 |
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
# pywin32 must be installed | |
# pip install wmi | |
import win32gui | |
import win32process | |
import win32pdhutil | |
import wmi | |
procs = wmi.WMI().Win32_Process() |
OlderNewer