Skip to content

Instantly share code, notes, and snippets.


Mao Wtm micromaomao

Block or report user

Report or block micromaomao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
micromaomao / data.yml
Last active Jun 20, 2019
zPermission bootstrap
View data.yml
players: []
- name: players
permissions: true
bukkit.command.tps: true true
coreprotect.inspect: true
coreprotect.lookup: true
essentials.afk: true
import sys
sys.path.insert(0, '../setval')
import setval as v
for x in range(32, 126):
xt = v.genpt(v.tryns(x))
print "(" + chr(x) + xt + ")"
micromaomao / aabb.hs
Created Jun 2, 2019
My Haskell "Hello World" Practice.
View aabb.hs
import Data.List
toListNums :: Int -> [Int]
chrToInt :: Char -> Int
chrToInt chr = read ([chr])
toListNums num = if length rs == 4 then rs else 0:rs where rs = map chrToInt (show num)
ifDistinct :: (Eq a) => [a] -> Bool
ifDistinct [] = True
ifDistinct (x:px) = x `notElem` px && ifDistinct px
View 1.js
* Problem 1
* Write three functions that compute the sum of the numbers in a given list using a for-loop, a while-loop, and recursion.
* Sum a integer list using `for`.
* @param list array list to sum
* @return the sum.
micromaomao / run_in_console.js
Created Jun 1, 2019
Mass delete stuff from
View run_in_console.js
setInterval(() => {try {let'.jsx-2732537345.options-image-wrapper'),-1)[0];;ele.remove();document.querySelector('.contextMenu-menuItem-delete').dispatchEvent(new MouseEvent('mousedown', {bubbles: true}));
document.querySelector('.button-base-kind-danger').click()} catch (e) {}}, 200)
use std::{io, mem};
use std::io::Write;
struct LockHolder {
stdout_ptr: *mut io::Stdout,
lock_ptr: *mut io::StdoutLock<'static>,
impl LockHolder {
fn new() -> Self {
micromaomao / checkEr.js
Last active Jan 6, 2018
Check paper completeness for SchSrch
View checkEr.js
fetch('/subjects/?as=json').then(res => res.json()).then(subjs => {
function doSubject(i) {
if (i >= subjs.length) return void console.log('# Done!')
let subj = subjs[i]
console.log('# Doing ' + subj._id + '...')
checkSubject(subj).then(() => { doSubject(i + 1) })
function checkSubject (subj) {
return Promise.all(subj.times
.map(time => checkEr(subj._id, time).then(b => Promise.resolve([time, b]))))

Keybase proof

I hereby claim:

  • I am micromaomao on github.
  • I am maowtm ( on keybase.
  • I have a public key ASBWYlQ8_f1DPRN9slDQM7YssGskMcQkqn5VDEWly5RNGQo

To claim this, I am signing this object:

View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
View sumall.sql
destinationAccount AS account,
IFNULL((SELECT sum(credit) FROM transactions WHERE destinationAccount=tx.destinationAccount), 0)
- IFNULL((SELECT sum(credit) FROM transactions WHERE sourceAccount=tx.destinationAccount), 0)
, 9)
AS balance
FROM transactions tx
GROUP BY destinationAccount
You can’t perform that action at this time.