Skip to content

Instantly share code, notes, and snippets.

View buonzz's full-sized avatar

Darwin Biler buonzz

View GitHub Profile
@buonzz
buonzz / player.txt
Created March 8, 2019 20:52
player
00:00 ●━━━━━━─────── 10:01
⇆ㅤㅤㅤㅤ◁ㅤㅤ❚❚ㅤㅤ▷ㅤㅤㅤ↻
@buonzz
buonzz / linux_cheatsheet.sh
Last active August 11, 2019 17:51
Linux CheatSheat
# Sysfs - virtual filesystem that the Linux kernel uses to export information about kernel objects to processes running in user space
mount ‑t sysfs sysfs /sys # mount sysfs
# udev is responsible for the dynamic device management needed for hot plugging devices. Information about configured and active devices is contained in the /dev virtual filesystem
# search man page only in title
man -af
# update man pages
makewhatis (RHEL)
@buonzz
buonzz / elixir_cheatsheet.sh
Last active November 3, 2018 21:03
elixir cheatsheet
# to invoke the REPL
iex
# output a simple string
IO.puts "Hello world"
# to run a file
elixirc test.ex
# always use snake case
@buonzz
buonzz / est_vs_edt.txt
Created October 9, 2018 20:07
EST vs EDT bullshit
The Eastern Time Zone is an area 5 hours behind Greenwich Mean Time ( GMT-5 ) during the winter months (referred to as EST) and 4 hours behind Greenwich Mean Time ( GMT-4 ) during the summer months (referred to as EDT)
@buonzz
buonzz / gist:81207a03f6f143ef4575b11379f8023a
Created August 22, 2018 07:27
Pass raw query like OR AND operators in the elasticsearch query
curl -X POST "localhost:9200/stackoverflow/_search?size=0" -H 'Content-Type: application/json' -d'
{
"query": {
"query_string": {
"query": "tags:kibana OR tags:javascript"
}
},
"aggs": {
"sample": {
"sampler": {
@buonzz
buonzz / cypher_cheatsheet.sh
Created July 9, 2018 07:48
cypher cheatsheet
# create an index
CREATE INDEX ON :Person(name)
# drop an index
DROP INDEX ON :Person(name)
# ensure unique names
CREATE CONSTRAINT ON (n:Person) ASSERT n.code IS UNIQUE
# list all indices
@buonzz
buonzz / ubuntu_version.sh
Created June 23, 2018 13:09
show ubuntu version
lsb_release -a
@buonzz
buonzz / user_group.sh
Created June 21, 2018 10:25
add user to group then give group permission
sudo usermod -a -G groupname username
sudo chmod g+w myfolder
@buonzz
buonzz / nodereinstall.sh
Created June 21, 2018 08:53 — forked from brock/nodereinstall.sh
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@buonzz
buonzz / which_using_port.sh
Created June 17, 2018 21:25
detect which service is using the port
sudo lsof -i:80