Skip to content

Instantly share code, notes, and snippets.

View lostsnow's full-sized avatar
👻
nil

lostsnow lostsnow

👻
nil
  • Litsea
  • Phobos, Mars
View GitHub Profile
@lostsnow
lostsnow / ngx-vhost.pl
Last active August 29, 2015 14:25
find vhost in nginx config files
# http://lists.centos.org/pipermail/centos/2012-December/130613.html
while (<>) {
chomp();
next if (m/^\s*#/); #comment
if ($enclosed) {
if (m/}/) {$enclosed = 0;} # end found
tr/}\;//d; #remove
push @servers, split(); #anything else on line
next;
} else {
@lostsnow
lostsnow / xyqy-map.md
Created September 28, 2015 07:24
xyqy-map.md
◇蟠桃园◇
               ◇◇◇◇◇
                 ∶ 
              ◇◇◇◇◇◇◇
              ◇     ◇
              ◇ 天 宫 ◇
              ◇     ◇
              ◇◇◇◇◇◇◇
       ~~~~~~~~~~~~~~~~~~~~~~~

Neutering the “developer mode” screen on your Chromebook

I am the proud owner of two Chromebooks – one Samsung Series 3 ARM Chromebook and one Samsung 550 Chromebook. Like many serial tinkerers the frowny/sick developer “warning” screen, which you get if you want to overwrite the operating system having to enable developer mode, is more of a pain than anything, much as I recognise it is for security. Having to press CTRL + D at every boot, or wait 30 seconds and endure a loud, audible beep is not my idea of slick fun. Happily, it is possible to all but disable this screen, by rewriting the BIOS with the correct “flags”. This leaves the screen enabled, but it only displays for 2 seconds, and there is no beep. Unhappily, you have to physically open the Chromebook up and disable the inbuilt BIOS write protect to take advantage of this.

The procedure is a follows:

  • Open Chromebook and enable/disable write protect jumpe
@lostsnow
lostsnow / genymotionwithplay.txt
Created March 11, 2016 01:32 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
server {
listen 80;
server_name www.xxoo.com xxoo.com;
server_tokens off;
location ^~ /.well-known/acme-challenge/ {
alias /var/lib/acme/.well-known/acme-challenge/;
try_files $uri =404;
}
@lostsnow
lostsnow / nginx.conf
Created December 21, 2016 09:35 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
// ==UserScript==
// @id iitc-plugin-intel-comm-backtrack@lostsnow
// @name IITC Plugin: Intel Comm Backtrack
// @category Tweaks
// @version 0.1.0
// @namespace https://github.com/lostsnow/ingress-intel-comm-backtrack
// @description Comm Backtracking.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
@lostsnow
lostsnow / crack-securecrt-fx.sh
Created December 8, 2017 15:54
SecureCRT and SecureFX crack script for windows version
#!/bin/sh
DIR=$1
CRT="SecureCRT.exe"
FX="SecureFX.exe"
LIC="LicenseHelper.exe"
crt_old_key="6e533e406a45f0b6372f3ea1071700000c7120127cd915cef8ed1a3f2c5b"
crt_new_key="785782391ad0b9169f17415dd35f00002790175204e3aa65ea10cff20818"
@lostsnow
lostsnow / emote.json
Last active March 26, 2018 11:05
MUD emote
/**
* 内容取自: https://raw.githubusercontent.com/mudchina/xyj2006/dfcaf62883c83b81c08c9e544bd833ec8e7713a9/world/data/emoted.o
*
* myself: 不指定对象使用这个 emote 时, 你自己看到的讯息
* others: 不指定对象使用这个 emote 时, 其他人看到的讯息
* myself_self: 对自己使用这个 emote 时, 自己看到的讯息
* others_self: 对自己使用这个 emote 时, 其他人看到的讯息
* myself_target: 对别人使用这个 emote 时, 自己看到的讯息
* target: 对别人使用这个 emote 时, 使用对象看到的讯息
* others_target: 对别人使用这个 emote 时, 除你自己和使用对象外, 其他人看到的讯息
@lostsnow
lostsnow / .profile
Last active April 3, 2018 13:39 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else