Skip to content

Instantly share code, notes, and snippets.

View adibenc's full-sized avatar
🎯
Focusing

M Adib zamzam adibenc

🎯
Focusing
View GitHub Profile
@adibenc
adibenc / flip elements
Created October 24, 2020 14:54
flip elements
tb2 = $('#tb2')
n=1
arr = []
while(n <= 232){
tr = $('.tr1')
arr.push(tr)
tr.remove()
n++;
}
@adibenc
adibenc / enc.coratcoret.py
Created November 2, 2020 05:32
enc.coratcoret.py
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from operator import xor
import binascii, sys
KEY_first = "1niL0HkuNc1NY4"
msg = "1a00000000000000000000000000006ab22c40003a49dbf8d8e6f49fb141e030b1e4ae96d1ec0d35e515e7bf6d108f8ebc0fb235b00c6f8d4947b13183e09c36"
lenref="e7bf6d108f8ebc0fb235b00c6f8d"
@adibenc
adibenc / phpunit.funcs.txt
Created November 4, 2020 05:22
phpunit funcs
/home/zam/file
assertArrayHasKey()
assertArrayHasKey(mixed $key, array $array[, string $message = ''])
assertArrayNotHasKey() is the inverse of this assertion and takes the same arguments.
assertClassHasAttribute()
assertClassHasAttribute(string $attributeName, string $className[, string $message = ''])
assertClassNotHasAttribute() is the inverse of this assertion and takes the same arguments.
assertClassHasStaticAttribute()
assertClassHasStaticAttribute(string $attributeName, string $className[, string $message = ''])
assertClassNotHasStaticAttribute() is the inverse of this assertion and takes the same arguments.
@adibenc
adibenc / index.js
Created December 5, 2020 08:58
gacha
const express = require('express')
const app = express()
const port = 3000
const cookieParser = require('cookie-parser');
app.use(cookieParser());
require('dotenv').config()
const seedrandom = require('seedrandom')
@adibenc
adibenc / xboxdrv-logitech.ini
Created December 11, 2020 22:24
xboxdrv logitech ini - joystick as mouse
# sudo xboxdrv --config xboxdrv-mouse.ini
[xboxdrv]
evdev=/dev/input/event15
silent=true
[evdev-absmap]
ABS_X=x1
ABS_Y=y1
ABS_HAT0X=x2
ABS_HAT0Y=y2
@adibenc
adibenc / postman.util.js
Created December 15, 2020 10:15
postman.util
var intDate = Date.now().toString().substring(0,12);
console.log(intDate)
postman.setEnvironmentVariable('uniqint', intDate);
import requests
from bs4 import BeautifulSoup
url = "https://news.ycombinator.com/"
upvoted = "upvoted?id=your.user.id&p="
fmt = "hn{}.html"
iframe = """<iframe src="{}" title="description" height="1500" width="800"></iframe>"""
cookies = {
"user":"your cookie"
}
@adibenc
adibenc / ieee.literature.rev.py
Created December 19, 2020 14:53
ieee literature review py
!#/usr/bin/env
"""
https://ieeexplore.ieee.org/search/searchresult.jsp?queryText=literature%20review&highlight=true&returnType=SEARCH&matchPubs=true&pageNumber=11&ranges=2010_2021_Year&returnFacets=ALL
1. open console
arr = []
$('.List-results-items').each(function(i,e){
arr.push($(e).text())
})
JSON.stringify(arr)
@adibenc
adibenc / sino.csv
Created December 22, 2020 14:09
sinonim
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 6 in line 8.
id,idcommerce,idcommerce2,idsubproses,idsubproses2,subp,subp2,w1,w2,wx,wsinonim,created_at
1,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,pendaftaran,pencatatan,2020-12-19 11:52:25
2,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,pendaftaran,pendataan ,2020-12-19 11:52:25
3,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,pendaftaran,registrasi,2020-12-19 11:52:25
4,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,memeriksa ,menguji,2020-12-19 11:52:25
5,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,memeriksa ,memverifikasi,2020-12-19 11:52:25
6,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran,memeriksa ,memeriksa ,membuktikan,2020-12-19 11:52:25
7,1,2,1,1,pendaftaran mengisi identitas ,memeriksa nomor telepon ,pendaftaran ,nomor ,pendaftaran ,pencatatan,2020-12-19 11:52:25
8,1,2,1,1,pen
@adibenc
adibenc / run-syn.md
Created December 23, 2020 10:03
run sinonim

Sinonim

1. Load Data

LOAD CSV WITH HEADERS FROM 'https://gist.githubusercontent.com/adib-enc/d01f3413665615232bb6ce1b8a8ed2c3/raw/ff374363111f6249e7738dc004ed61e993df0385/sino.csv' as row
MERGE (k:Kata {kata: row.wx})
MERGE (s:Sinonim {sinonim: row.wsinonim, w1: row.w1, w2: row.w2, wx: row.wx});

2. Create graph