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 | |
import os | |
import subprocess | |
import sys | |
from urllib import pathname2url | |
import selenium.webdriver | |
def run(): | |
watch_command = 'inotifywait -rq -e close_write --exclude \'"*.html"\' .'.split() | |
make_command = 'make html'.split() |
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
# Run: | |
# $ virtualenv env | |
# $ cd env | |
# $ env/bin/pip install watchdog | |
# $ env/bin/pip install selenium | |
# $ env/bin/python sphinx-reload.py | |
import logging | |
import os | |
import selenium.webdriver |
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 <stdio.h> | |
#include <ffi/ffi.h> | |
/* The struct with inlined arrays */ | |
struct test { | |
int array[5]; | |
char str[6]; | |
}; | |
/* The function to FFI invoke */ |
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 python3 | |
import sys | |
import socket | |
import select | |
def command(name, args=None): | |
return {'name': name, 'args': args} | |
def readcmd(): |
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 nonlocal_ import nonlocal_ | |
def foo(): | |
a = 1 | |
def bar(): | |
nonlocal_('a') | |
a = 2 | |
bar() | |
return 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
#!/usr/bin/env python | |
""" | |
Usage: | |
using ~/.slackmerc file: | |
$ slackme some info # with `default` profile | |
$ slackme --profile alert some info # using `alert` profile | |
put profile in filename: |
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
--- C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.txt | |
+++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat | |
@@ -16,23 +16,23 @@ | |
goto :eof | |
:amd64 | |
-if not exist "%~dp0bin\amd64\vcvarsamd64.bat" goto missing | |
-call "%~dp0bin\amd64\vcvarsamd64.bat" | |
+if not exist "%~dp0bin\vcvars64.bat" goto missing | |
+call "%~dp0bin\vcvars64.bat" |
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 abc import ABC, ABCMeta, abstractmethod | |
from collections import namedtuple | |
from functools import partial, singledispatch | |
from itertools import count | |
PayloadFactory = namedtuple('PayloadFactory', [ | |
'good', 'created', 'queued', 'unchanged', 'requires_auth', | |
'permission_denied', 'not_found', 'invalid', 'error' | |
]) |
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
license: gpl-3.0 |
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
* { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.grid { | |
width: 99%; | |
margin-left: auto; | |
margin-right: auto; |
OlderNewer