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/env python | |
from abc import ABCMeta, abstractmethod | |
from functools import wraps | |
import time | |
class ContextDecorator(object): | |
_built = False |
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/env python | |
from abc import ABCMeta, abstractmethod | |
from functools import wraps | |
import time | |
class Singleton(ABCMeta): | |
_instance = None | |
def __call__(cls, *args, **kwargs): |
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 | |
happened=1 | |
for window in $(recsel_windows.py -l -c 0,0.5,1,0.6) | |
do | |
happened=0 | |
xdotool windowactivate --sync $window key "$1" | |
done | |
if [ $happened -a -n "$2" ];then |
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
from PyQt4 import QtGui, QtCore | |
import maya.cmds as cmds | |
import maya.OpenMayaUI as mui | |
import sip | |
def convertToQT(controlName): | |
controlPoniter = mui.MQtUtil.findControl(controlName) | |
if controlPoniter is not None: | |
return sip.wrapinstance(long(controlPoniter), QtCore.QObject) |
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
diff -ur NVIDIA-Linux-x86_64-375.39/kernel/common/inc/nv-mm.h NVIDIA-Linux-x86_64-375.39.patched/kernel/common/inc/nv-mm.h | |
--- NVIDIA-Linux-x86_64-375.39/kernel/common/inc/nv-mm.h 2017-01-31 21:50:37.000000000 -0500 | |
+++ NVIDIA-Linux-x86_64-375.39.patched/kernel/common/inc/nv-mm.h 2017-03-29 14:40:57.433472236 -0400 | |
@@ -47,6 +47,8 @@ | |
*/ | |
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT) | |
+ #include <linux/version.h> | |
+ | |
#if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS) |
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
# | |
# Automatically generated make config: don't edit | |
# crosstool-NG 1.21.0 Configuration | |
# Wed Mar 22 21:55:48 2017 | |
# | |
CT_CONFIGURE_has_xz=y | |
CT_CONFIGURE_has_svn=y | |
CT_MODULES=y | |
# |
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
# config example from http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v |
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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
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
// ==UserScript== | |
// @name withDigit | |
// @namespace taobao | |
// @include https://detail.tmall.com/* | |
// @version 0.02 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @grant GM_xmlhttpRequest | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle("table.crap td { padding:0 5px 0 5px; }"); |