Skip to content

Instantly share code, notes, and snippets.

var shake = (function () {
var shake = {},
watchId = null,
options = { frequency: 300 },
previousAcceleration = { x: null, y: null, z: null },
shakeCallBack = null;
// Start watching the accelerometer for a shake gesture
shake.startWatch = function (onShake) {
shakeCallBack = onShake;
@phoeagon
phoeagon / Ingress 新手教程
Created August 10, 2013 06:46
Ingress 新手教程
https://docs.google.com/document/d/1ZKt6bvgcsS4Bzve8k36FZNmAYrwt8QrSn-wztNpOkhU/edit
链接是一篇目前为止见过最大而全的教程,如果可以早点看到就好了,你可以理解为是我这篇po和置顶帖另外一篇“数据控”的po的并集的子集。
这篇po算是version2了,修正了之前的错误
感谢Kururu,米非,howard lee,Shiyuan Chen等人的教授
另外经验什么的,在时间这把杀猪刀和汽车飞机等交通工具面前都是浮云
关于passcode,可以加入decode ingress这个社群,或者邮件订阅他们的博客,高手可以自己破解media
@phoeagon
phoeagon / gist:6250455
Created August 16, 2013 14:35
Mathematica
Solve[0 == (a*x1 + b*y1 + c) && 0 == (d*x1 + e*y1 + f) &&
A (g*x2 + h*y2 + 1) == (a*x2 + b*y2 + c) && 0 == (d*x2 + e*y2 + f) &&
0 == (a*x3 + b*y3 + c) &&
A (g*x3 + h*y3 + 1) == (d*x3 + e*y3 + f) &&
A (g*x4 + h*y4 + 1) == (a*x4 + b*y4 + c) &&
A (g*x4 + h*y4 + 1) == (d*x4 + e*y4 + f), {a, b, c, d, e, f, g, h}]
-------------------------------------------------------------------------------------
@phoeagon
phoeagon / gist:6661111
Created September 22, 2013 15:34
一些課的介紹
当代中国外交-郑华:全英文的课,就是看看凤凰卫视的纪录片什么的,课上回答过一次问题之后她就不会点你,也就是说可以翘课,不想翘课的话可以带作业过去做,很水很水就对了。全程就交一个论文,回答一个问题,最后考试。论文的话,每周布置一个论文题目,全英论文1000字(其实写起来还是很辛苦的),当周的论文题目下周交,满分20分写得好的话可以拿19(其实就是写得完整一点,参考文献做得规范一点就好了的),最后一节课开卷考试,考试题目在倒数第二节课有说,我这里有自己找好了的答案,你们要的话可以来参考。给分很高,95+
风险与社会保障-张录法:很无聊的课,不点名,就带作业过去写或者翘课好了,最好是有一两个熟悉的同学一起上课,因为说不定你翘课期间他就分组了,期末是五人一组做小组论文和PPT展示,分工合作很容易的咯,还有交一张作业题,很水很水自己百度一下然后写好交上去,但是记得要交。给分不高,88.
无线电波中的宇宙:上课的老师据说是院士,可惜我没去听过几次,反正听不懂,老师很松,一开学就说你们可以迟到可以早退可以不请假就不来可以做其他事可以打瞌睡之类的,不过中途换了另一个严一点的老师,反正最好是有个认识的同学一起上课,有什么通知就相互通知一下,分组什么的可以分到一起。期末小组做PPT演讲,5、6个人做那么一个东西,真的是水到可以。给分略坑,89.(最讨厌4和9结尾的了!)(哈哈哈哈哈师姐上这门课的时候最羞射了~~~~~原因我就不说了哈哈哈哈哈哈by师兄)
莎士比亚戏剧赏析-李琤:还不错的课,不点名,讲得又不错,期间选一个戏剧,和选同个戏剧的人分到一个小组,然后每讲完一个戏剧这个戏剧对应的小组就每个人都上去做presentation,期末小组表演戏剧的某个片段,最后交全英论文,但是给分很低啊85掀桌。。没拿过这么低的分啊TAT
组织文化研究-周国华:现在改名为组织文化建设了,马克思主义学院开的任选课,不点名,上课很有趣,每次课后会留两道题目,你自己找资料之后做PPT下节课上来讲,有讲就有加分,最后期末写中文论文,我是做了两次PPT,最后91.
@phoeagon
phoeagon / pipe-full.hcl
Created October 15, 2013 04:12
pipe-full.hcl
#/* $begin pipe-all-hcl */
####################################################################
# HCL Description of Control for Pipelined Y86 Processor #
# Copyright (C) Randal E. Bryant, David R. O'Hallaron, 2002 #
####################################################################
## Your task is to implement the iaddl and leave instructions
## The file contains a declaration of the icodes
## for iaddl (IIADDL) and leave (ILEAVE).
## Your job is to add the rest of the logic to make it work
@phoeagon
phoeagon / android.img.resize.sh
Created February 8, 2015 10:30
Android Image Resizer ]
#name="IMG_20140806_120943.jpg"
list="IMG_20141224_201840.jpg IMG_20140617_114127.jpg IMG_20131013_215858.jpg IMG_20140113_093800.jpg IMG_20130806_154542.jpg IMG_20141224_142229.jpg IMG_20130728_151217.jpg IMG_20130909_110617.jpg IMG_20140731_102029.jpg IMG_20140710_111423.jpg IMG_20140201_184312.jpg IMG_20130725_163045.jpg IMG_20141021_191224.jpg IMG_20130728_150751.jpg IMG_20140810_122311.jpg IMG_20130728_151211.jpg IMG_20140723_121027.jpg IMG_20150122_122745.jpg IMG_20130728_151214.jpg IMG_20150128_160127.jpg IMG_20150205_122303.jpg IMG_20130929_231316.jpg IMG_20140919_144425.jpg IMG_20130728_144031.jpg IMG_20140919_144423.jpg IMG_20130804_215144.jpg IMG_20140707_122932.jpg IMG_20130728_184341.jpg IMG_20131019_120344.jpg IMG_20140828_093544.jpg IMG_20130804_190246.jpg IMG_20141224_142140.jpg IMG_20141224_220909.jpg IMG_20150106_140024.jpg "
for name in $list; do
adb pull /sdcard/DCIM/Camera/$name /run/shm/1.jpg
convert /run/shm/1.jpg -resize 2048x1536 /run/shm/1.tmp
adb push /run/shm/1.tmp /sdcard/t
@phoeagon
phoeagon / gist:85a5bca15d4a8f33e21f
Created April 4, 2015 15:35
smtp.google.com Cert problem
-----BEGIN CERTIFICATE-----
MIIEdjCCA16gAwIBAgIIRU1aGVzo3ukwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTUwMjE4MTAxOTU2WhcNMTUxMjMxMDAwMDAw
WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEXMBUGA1UEAwwOc210
cC5nbWFpbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDWhzIM
jqZemjDUQZOzyhmeVu6uX+ZFWqnkXp4tliDcbPsrtyZQYxqw8XsArzCBKtp6DY85
rVy8IjFXoXtPHA/LMWDlvryELz2jV1z08x37yZ6FPDR056mysCOfCDFX4uNyunTf
lvR4f8oL0ngmSZdAAVCGc9jfTg9CQYXKCRHv1EIKF+T4vk5xgiNV3N8Wy6dbfVu3
@phoeagon
phoeagon / test_access.c
Last active December 17, 2015 08:26
Test whether memory can be accessed
#define _GNU_SOURCE
#include <stdio.h>
#include <udis86.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <ucontext.h>
#include <execinfo.h>
#include <setjmp.h>
@phoeagon
phoeagon / gist:2b9076475f63157d67d4
Created June 26, 2015 04:10
Domain List of supposedly hijacked sites
001d.com
007.mx
02011.com
03.com
0991dj.com
1000kan.cc
100pd.cc
100pd.com
101yy.net
107cine.com
@phoeagon
phoeagon / hangbot.log
Last active October 1, 2015 13:17
A log of the words provided by HangBot @ Telegram
chemokyne
raking
dirge
tobacconist
ageist
betacarotene
neuraminidase
phrenalgia
hereditarianism
irredentism