Skip to content

Instantly share code, notes, and snippets.

View lostsnow's full-sized avatar
👻
nil

lostsnow lostsnow

👻
nil
View GitHub Profile
@lostsnow
lostsnow / binlog_time.sql
Created January 19, 2024 07:46 — forked from haitaoyao/binlog_time.sql
设置 AWS RDS binlog 保存时间
-- http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html
call mysql.rds_set_configuration('binlog retention hours', 24);
@lostsnow
lostsnow / gist:fe284bcae51230e210e9d05652f689ed
Created September 30, 2023 11:04 — forked from gus4rs/gist:18e00a1249778b8bbbb71c3efe586ff1
Create a validator on Holesky without the Launchpad

⚠️ Do not do this for mainnet, this is a quick and insecure procedure that it's fine for Testnet only

  1. Download and install https://github.com/wealdtech/ethdo and https://github.com/ethereum/staking-deposit-cli
  2. Connect your Metamask to Holesky and generate a new address
  3. Use the address to get some 33 HolETH from https://holesky-faucet.pk910.de/
  4. Generate a new keystore for your validator using the staking-deposit-cli tool. Replace 0xADDR by your metamask address
./deposit.sh new-mnemonic --chain holesky --execution_address 0xADDR --num_validators 1
@lostsnow
lostsnow / purge2.sh
Created December 7, 2018 12:11 — forked from carlessanagustin/purge2.sh
Script to reduce VM size before packaging for Vagrant v.2
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
# - https://gist.github.com/adrienbrault/3775253
## for vagrant related tasks, uncomment vagrant comments
# vagrant: Unmount project
@lostsnow
lostsnow / axurepr 序列号
Created August 16, 2018 02:50
一些能用的团队版序列号
**Axure 8.0及以前**
Licensee:IloveyouAxure
Key:UChpuxwbDW6eAIaAf9UujEFSBwN3vpEz9snHvlCQVJGQy4p7WrCyKLLvV5QLvqva
Licensee:Axure
Key:8t+3Yk/zu4cX601/seX6wBZgYRVj/lkC2PICCdO4+sFKCCLx8mcCnccoylVb40lP
Licensee:axureuser
Key:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
Licensee:米 业成 (STUDENT)
Key:nFmqBBvEqdvbiUjy8NZiyWiRSg3yO+PtZ8c9wdwxWse4WprphvSu9sohAdpNnJK5
**Axure 8.1.0.3366**
@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
@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
@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)

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 / go.sh
Last active August 29, 2015 14:18 — forked from mindscratch/go.sh
docker run --rm -it centos:centos6 /bin/bash
yum install -y wget tar
wget https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.5.4/kubernetes.tar.gz
wget https://github.com/coreos/etcd/releases/download/v0.4.6/etcd-v0.4.6-linux-amd64.tar.gz
# untar kubernetes and add binaries to path
tar -xf kubernetes.tar.gz
cd kubernetes/server
tar -xf kubernetes-server-linux-amd64.tar.gz
cd kubernetes/server/bin
@lostsnow
lostsnow / ocp.php
Last active August 29, 2015 14:06 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs