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
# minute hour day of month month day of week command | |
# 0-59 0-23 1-31 1-12 0-7 (0/7 is Sun) | |
30 18 * * * root /opt/vc/bin/tvservice -p ; /opt/vc/bin/tvservice -o | |
30 8 * * 1-5 root /opt/vc/bin/tvservice -p ; sudo chvt 6; sudo chvt 7 |
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
background yes | |
use_xft yes | |
xftfont Sans:size=8 | |
xftalpha 1 | |
update_interval 1.0 | |
total_run_times 0 | |
own_window yes | |
own_window_transparent yes | |
own_window_type desktop | |
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager |
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
class Size | |
{ | |
public: | |
Size(); | |
Size(uint width, uint height); | |
const Size& setWidth(uint width); | |
const Size& setHeight(uint height); | |
uint width() const; | |
uint height() const; | |
private: |
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
std::map<std::string, std::string> result; | |
std::string str("foo=bar&color=red&zoom=22.5&alpha=3,4,2,1222.8"); | |
sregex pair = ( (s1= +_w) >> "=" >> (s2= +(set[alnum | '_' | '.' | ',']) )) | |
[ ref(result)[s1] = s2]; | |
sregex rx = pair >> *('&' >> *(pair)); | |
if(regex_match(str, rx)) { |
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
""" | |
https://github.com/coffin/coffin/blob/master/coffin/template/defaulttags.py | |
""" | |
class SpacelessExtension(Extension): | |
"""Removes whitespace between HTML tags, including tab and | |
newline characters. | |
Works exactly like Django's own tag. | |
""" |
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 os | |
import sys | |
import pyttsx | |
def main(): | |
engine = pyttsx.init() | |
for root, dirs, filenames in os.walk('.'): | |
for filename in filenames: | |
basename, extension = os.path.splitext(filename) | |
fullpath = os.path.abspath(os.path.join(root, 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
#include <iostream> | |
#include <boost/shared_ptr.hpp> | |
class VideoManagerPrivate { | |
private: | |
friend class VideoManager; | |
VideoManagerPrivate() { } | |
bool init(int _width, int _height, short _bpp, bool _fullscreen) { |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
QString atom( | |
"declare namespace atom = \"http://www.w3.org/2005/Atom\";\n" | |
"declare namespace media = \"http://search.yahoo.com/mrss/\";\n" | |
"doc($result)//atom:entry/media:group/media:player/@url/string()\n" | |
); | |
QXmlQuery query; | |
query.bindVariable("result", &buffer); | |
query.setQuery(atom); |
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
/* | |
* Based on this picture | |
* http://imgur.com/ZZxFy | |
*/ | |
#include <cstdio> | |
#include <stdio.h> | |
#include <windows.h> | |
#include <tlhelp32.h> |
OlderNewer