Skip to content

Instantly share code, notes, and snippets.

@franga2000
franga2000 / Xiaomi YI.md
Last active February 2, 2024 10:30
Xiaomi Yi

Xiaomi Yi camera

General info

  • OS: Buildroot
  • CPU: ARMv6-compatible processor rev 5 (v6l)
  • BogoMIPS: 524.28
  • Memory: 37MB

The root filesystem is rootfs, which is stored in memory and therefore wiped on reboot. The Micro SD card is mounted at /tmp/fuse_d/. Something is also mounted at /tmp/fuse_a and /tmp/fuse_z.

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@justecorruptio
justecorruptio / 2048.c
Created April 4, 2014 03:49
Tiny 2048 in C!
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2
@Edditoria
Edditoria / evernote-clearly.css
Created December 15, 2012 09:15
My customized CSS theme for the Evernote Clearly browser extension
/**
* CSS theme for the Clearly browser extension by Evernote.
* See: www.evernote.com/clearly/
*
* Options used alongside this CSS:
* Body font: "Adelle", Georgia, 微軟正黑體, Helvetica, Arial, sans-serif
* Header font: Soho-condensed, PT Serif, 微軟正黑體, Helvetica
* Monospace font: 微軟正黑體Mono, Inconsolata, Consolas, Droid Sans Mono
* Background: #FFFFFF
* Foregound: #333333
@fredrikw
fredrikw / mediakeys.py
Created November 15, 2012 11:07
Python script to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys. Easiest used in combination with a launcher/trigger software such as Quicksilver.
#!/usr/bin/python
# CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys.
# Easiest used in combination with a launcher/trigger software such as Quicksilver.
# Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
# Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/
import Quartz
import sys
@Calvein
Calvein / Custom.css
Created March 23, 2012 20:24
Solarized Dark Skin for the Chrome DevTools
body#-webkit-web-inspector #main{background-color:#002b36!important}body#-webkit-web-inspector #main .panel.network,body#-webkit-web-inspector #main .panel.timeline,body#-webkit-web-inspector #main .panel.profiles,body#-webkit-web-inspector #main .panel.audits,body#-webkit-web-inspector #main .panel.extension{background-color:#fff!important}body#-webkit-web-inspector #console-messages a:hover,body#-webkit-web-inspector #console-messages .console-formatted-function,body#-webkit-web-inspector #console-messages .console-formatted-object{color:#93a1a1!important}body#-webkit-web-inspector #console-prompt,body#-webkit-web-inspector #console-messages a,body#-webkit-web-inspector #console-messages .console-message,body#-webkit-web-inspector #console-messages .console-group-messages .section .header .title{color:#839496!important}body#-webkit-web-inspector #console-messages .console-formatted-null,body#-webkit-web-inspector #console-messages .console-formatted-undefined{color:#657b83!important}body#-webkit-web-inspect
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@epegzz
epegzz / Monaco_Linux-Powerline.ttf
Created January 18, 2012 17:19
Monaco for vim-powerline
@potch
potch / gist_line_numbers.css
Created September 26, 2011 18:53
CSS to add line numbers to embedded gists
.gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist-highlight pre {
counter-reset: linenumbers;
}
.gist-highlight pre div:before {
@jamiew
jamiew / tumblr-photo-ripper.rb
Created July 13, 2011 17:46
Download all the images from a Tumblr blog
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"