Skip to content

Instantly share code, notes, and snippets.

View clvv's full-sized avatar

Wei Dai clvv

View GitHub Profile
#!/system/bin/sh
# setcpu, a set cpu script written for custom Android Roms by clvv <x@wei23.net>
# Usage: setcpu [MINFREQ MAXFREQ GOVERNOR]
# setcpu -h, --help #print this message
# setcpu -s, --status #print CPU status
# If no parameter is specified, an interactive setup guide will start.
# NOTE: This script MUST be run as root in order to make configuration change!
# Tips: run 'watch -n1 setcpu -s' to watch CPU status, refresh every second.
# Happy overclocking! :)
@clvv
clvv / gist:905224
Created April 6, 2011 06:27
Quiz on Mental Day of the Week Calculation
#!/usr/bin/env ruby
# This is a quiz that test you on your mental day of the week calculation.
# Enter a number according to the date prompted, Monday being 1. (1..7)
times = 10 # Number of dates
i = total_time = 0
times.times do
year = rand > 0.3 ? 1900 + rand(150) : 1600 + rand(700)
@clvv
clvv / hpsmb.rb
Created August 23, 2011 07:00
Mechanize Scrapping Script for HP SMB Order Status Checking Page
require 'mechanize'
agent = Mechanize.new
agent.max_history = 1
result = {}
latest_shipped_16 = File.read('latest_shipped_16').to_i
latest_shipped_32 = File.read('latest_shipped_32').to_i
@clvv
clvv / sat_score.rb
Created October 23, 2011 03:40
College Board SAT Score Scraping with Ruby and Mechanize(a quick snippet)
require 'mechanize'
agent = Mechanize.new
agent.get 'https://nsat.collegeboard.org/satweb/satHomeAction.action'
agent.page.forms[2].username = 'username'
agent.page.forms[2].password = 'password'
agent.page.forms[2].submit
# Second login step if required
@clvv
clvv / nocturne-v1_attestation.log
Created October 26, 2023 20:35
Attestation for nocturne-v1 MPC Phase 2 Trusted Setup ceremony
Hey, I'm clvv-200888 and I have contributed to the nocturne-v1 MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (canonaddrsigcheck)
Contributor # 25
Contribution Hash: fe56d161 472e31bd 7bace8a1 4fcafa8c
60966d1a 28d7c542 dcc31351 d7befbaf
1db4506e 43088b1c 0b8cb980 9755e7b5
96072025 1f7aebf4 aa64ec89 6b0da89a