Skip to content

Instantly share code, notes, and snippets.

View TommyJerryMairo's full-sized avatar

Tommy Jerry Mairo TommyJerryMairo

View GitHub Profile
call plug#begin('~/.local/share/nvim/plugged')
" " Language Server Protocol (LSP) support
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
" (Optional) Multi-entry selection UI.
Plug 'junegunn/fzf'
@TommyJerryMairo
TommyJerryMairo / acm.h
Created June 23, 2018 02:57
Macros that useful in competitive programming
#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
@TommyJerryMairo
TommyJerryMairo / darkart.h
Created June 8, 2018 21:00
Macro for Competitive Programming
#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <cassert>
#include <cstdio>
#include<iostream>
#include<cstdio>
#include<unistd.h>
#include<getopt.h>
using namespace std;
int reverse(int);
void help(char *);
void big2lettle(int);
#include<iostream>
#include<cstdio>
using namespace std;
int main(int argc, char * argv[]){
if(2==argc){
int x = atoi(argv[1]);
cout << "Origional: " << x << endl;
//cout << "Big-endian: " << hex << uppercase << x << endl;
@TommyJerryMairo
TommyJerryMairo / VPS-Service-List
Created November 28, 2017 06:59
Functionality to do with vps.
1. Host Tor relay
2. Host i2p node
3. Tor gateway via i2p
4. Gogs
5. zeronet node
@TommyJerryMairo
TommyJerryMairo / simulate_keypress.js
Created November 22, 2016 09:36 — forked from ejoubaud/simulate_keypress.js
Simulate keypress that works in Google nav in Chrome
// Based on http://stackoverflow.com/a/10520017/1307721 and http://stackoverflow.com/a/16022728/1307721
Podium = {};
Podium.keydown = function(k) {
var oEvent = document.createEvent('KeyboardEvent');
// Chromium Hack
Object.defineProperty(oEvent, 'keyCode', {
get : function() {
From base/archlinux
Maintainer "TJM <tommy.mairo@gmail.com>"
ENV TERM=xterm-256color
RUN ["/usr/bin/pacman","-Sy"]
RUN ["/usr/bin/pacman","--noconfirm","-S","archlinux-keyring"]
RUN ["/usr/bin/pacman","--noconfirm","-S","pacman-mirrorlist"]
RUN ["/usr/bin/sed","-i","s/^#Server/Server/","/etc/pacman.d/mirrorlist.pacnew"]
RUN /usr/bin/bash -c '/usr/bin/grep -v \# /etc/pacman.d/mirrorlist.pacnew >/tmp/mirrorlist'
RUN /usr/bin/bash -c "/usr/bin/rankmirrors /tmp/mirrorlist > /etc/pacman.d/mirrorlist"
RUN ["/usr/bin/pacman","--noconfirm","-Syu"]
#!/bin/bash
export TRIGGER=FB_RecoveryLauncher/recovery.trigger.new
export LAUNCHER=FB_RecoveryLauncher/recovery.launcher
export RECOVERY=FB_RecoveryLauncher/recovery.zip
export OEMTRIGGER=/system/bin/logcat
export OEMCMD=stop_partitioning
fastboot flash /tmp/recovery.zip $RECOVERY
fastboot flash /tmp/recovery.launcher $LAUNCHER
#!/bin/sh
#need ZenFoneRootKit_20150614.zip
#set -v
BASEDIR=$(dirname $0)
cd $BASEDIR
chmod +x files/adb.mac
chmod +x files/fastboot.mac
ADBBINARY="adb"