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
- Download source from: https://drive.google.com/file/d/0B-PZvjWWRSpQbldxaFhIR2hEeG8/view?usp=sharing | |
- Extract the file using | |
tar -xvzf v4l2.tar.gz | |
- Visit 'v4l2/libv4l' directory | |
cd v4l2/libv4l | |
make clean |
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 file; DO NOT EDIT. | |
# Linux/arm 3.4.5 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_HAVE_PWM=y | |
CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
CONFIG_GENERIC_GPIO=y | |
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set | |
CONFIG_GENERIC_CLOCKEVENTS=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
obj-m += hello-packet.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
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 | |
# https://www.google.com/about/careers/search?src=Online/Google+Website/ap2015?utm_source=hacker-news&utm_medium=other&utm_campaign=Online/Social/hacker-news#!t=jo&jid=98895001& | |
en_dict = { | |
'a': '4', | |
'b': 'b', | |
'c': 'c', | |
'd': 'd', | |
'e': '3', | |
'f': 'f', |
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
(defun python-insert-utf8() | |
"Insert default uft-8 encoding for python" | |
(interactive) | |
(newline) | |
(goto-char (point-min)) | |
(insert "# -*- coding: utf-8 -*-") | |
(next-line)) | |
(add-hook 'python-mode-hook 'python-insert-utf8) |
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
# Prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[31;38m\]\u@\h\[\033[00m\]:\[\033[31;38m\]\w\[\033[1;31m\]\$(parse_git_branch)\[\033[00m\] " | |
# Editor | |
export GIT_EDITOR='nano -Y patch' |
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
** django | |
- Variable defined in settings.py available to templates(templates | |
context processor) | |
Create =context_processors.py= in app directory. Say the | |
value of variable is =ADMIN_MEDIA_PREFIX= | |
#+BEGIN_SRC python -n | |
# app/context_processors.py |
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 ReverseIter: | |
def __init__(self, step): | |
self.step = step | |
def next(self): | |
if self.step == 0: | |
raise StopIteration | |
self.step -= 1 | |
return self.step | |
def __iter__(self): | |
return self |
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 | |
# Basic script for GMail. | |
import os | |
import smtplib | |
from email.MIMEText import MIMEText | |
from email.mime.image import MIMEImage | |
from email.mime.multipart import MIMEMultipart | |
from secret import password |
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
(defun screenshot-frame () | |
"Take screenshot. | |
Default image ~/screenshots/TIMESTAMP.png | |
Usage: | |
M-x screenshot-frame | |
Enter custom-name or RET to save image with timestamp" | |
(interactive) | |
(let* ((insert-default-directory t) |