Skip to content

Instantly share code, notes, and snippets.

View codenoid's full-sized avatar

Rubi codenoid

View GitHub Profile
@codenoid
codenoid / pubg_guide.md
Created December 1, 2017 02:59
Guide to play PUBG game

PUBG Guide (from Rules of Survival player : codenoid)

  1. always look around you
  2. after killing someone, do not go directly to his resource (blue diamond), wait for a while
  3. before shooting, make sure it fits on the target!
  4. Equip different primary weapon, like Rifle with Shotgun, Rifle with Sniper, Sniper with Shotgun, etc
  5. Stay Close with your friend !
  6. crawl immediately when there is danger (when we do not know where it came from)
  7. shoot the enemy directly when he does not know where we are (when 1v1 is strongly recommended)
@codenoid
codenoid / test.html
Last active November 29, 2017 08:13
62877812710229,24491182201,24909325,3504934546,13950935,77777777777
6282283719287,6282283721521,6282283989287
4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0. 4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0.4.4.4.4.0.0.0.0.4.0.4.0.4.0.4.0.4.0
@codenoid
codenoid / gist:5ff5097ad1652a15f6c6076fca97c2ac
Created November 16, 2017 13:02
change_datetime_to_jakarta.txt
sudo mv /etc/localtime /etc/localtime.old
sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
module Indexable(T)
def threadpool_map(workers : Int = 8, chunk_size : Int? = nil, &func : T -> R) forall T, R
mutex = Thread::Mutex.new
cs = chunk_size || (self.size**0.5).ceil.to_i
Array(R).build(self.size) do |result|
index = 0
threads = Array.new(workers) {
Thread.new do
a = b = 0
loop do
vim /etc/rc.local
<?php
# "pilih device|freq => port"
$args = array("0|1800" => "5000", "1|1820" => "4000", "2|1730" => "3000");
foreach($args as $key => $port) {
$parse = explode("|", $key);
$d = $parse[0]; # device number
$f = $parse[1]; # frequent
shell_exec("grgsm_livemon_headless args=rtl=$d --serverport=$port -f $f > /dev/null 2>/dev/null &");
}
@codenoid
codenoid / matchmacro.nim
Created September 11, 2017 07:18 — forked from mashingan/matchmacro.nim
defining match syntax using Nim macro
import macros
macro match(head, body: untyped): untyped =
result = newNimNode nnkStmtList
var casenode = newNimNode nnkCaseStmt
casenode.add head
for node in body:
node.expectKind nnkInfix