Skip to content

Instantly share code, notes, and snippets.

docker ps | grep elastic | awk '{print $1}' | xargs docker stop
docker ps -a | grep elastic | awk '{print $1}' | xargs docker rm
docker volume rm dockers_clickhouse dockers_mysql dockers_redis

Keybase proof

I hereby claim:

  • I am cenyg on github.
  • I am cenygg (https://keybase.io/cenygg) on keybase.
  • I have a public key ASD3kaGp4zLRa2h92NQVlOMZQyRc1mB7XMmLud0Vw5ZSRAo

To claim this, I am signing this object:

docker run -d -p 8888:8888 mfellner/javascript-notebook:latest
Jupyter for GO :
````
docker run -it -p 8888:8888 gopherdata/gophernotes
docker run -it -p 8888:8888 gopherdata/gophernotes-ds
>>New >>Go
````
@cenyG
cenyG / User-Agent list
Created January 22, 2019 10:09
List of some User-Agents
function userAgent() {
const userAgents = [
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1',
'Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 7.0; SM-G930VC Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 6.0.1; SM-G935S Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 6.0.1; SM-G920V Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36',
'Mozilla/5.0 (Linux; Android 6
{
"editor.smoothScrolling": true,
"workbench.panel.defaultLocation": "bottom",
"workbench.activityBar.visible": false,
"editor.minimap.enabled": false,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1500
}

Ubuntu language switch shortcut Shift + Alt

gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
@cenyG
cenyG / migration.sql
Created August 24, 2018 14:16 — forked from sevlyar/migration.sql
Add postgresql enum's element in transaction
-- rename the old enum
ALTER TYPE country_code RENAME TO country_code__;
-- create the new enum with the old name
CREATE TYPE country_code AS ENUM ('DE', 'AT', 'NL', 'CH');
-- ALTER all you enum columns
ALTER TABLE user_address
ALTER COLUMN country DROP DEFAULT;
ALTER TABLE user_address
@cenyG
cenyG / toWif.js
Last active August 14, 2018 13:28 — forked from t4sk/wif.md
How to convert private key to WIF
function toWIF(privkey, network) {
const netPriv = new Buffer([network.privatekey]).toString('hex');
let res = `${netPriv}${privkey}`
let chk = crypto.createHash('sha256').update(res, 'hex').digest()
chk = crypto.createHash('sha256').update(chk).digest()
const cheksum = chk.slice(0, 4).toString('hex')
res = `${netPriv}${privkey}${cheksum}`
const bs58 = require('base-x')('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')
@cenyG
cenyG / Readme.md
Last active June 25, 2018 13:33
How to deploy Ethereum contracts for testing

How to deploy Ethereum contracts for testing:

Will need :
https://metamask.io/
https://remix.ethereum.org
https://www.parity.io/

Use parity to connect to ropsten network. Now you can connect to Parity localhost address 127.0.0.1:8545 and use RPC.
Use Metamask to send transactions.
Use Remix to deploy contracts. Remix will automatically detect your Metamask web3.js adapter and use it to deploy contracts from your wallet address.