Skip to content

Instantly share code, notes, and snippets.

@h4n2k
h4n2k / gist:78e6253f69c87cde933e08b65d79f3f1
Last active October 3, 2017 10:31
How to switch to Long Term Support (LTS) kernel - Arch Linux
- install lts kernel
sudo pacman -S linux-lts
-or-
sudo pacman -S linux-lts linux-lts-headers
- (optional) check if kernel, ramdisk and fallback are available
ls -lsha /boot
- (optional) remove the standard kernel
@h4n2k
h4n2k / gist:1f5f97493549acd67336ef952ae44aaf
Created September 12, 2017 14:56
update boot menu - grub - arch linux
sudo grub-mkconfig -o /boot/grub/grub.cfg
@h4n2k
h4n2k / gist:bdefb4110dde3d68804ae30834a6c6f8
Last active October 1, 2018 09:30
nodemon DEBUG on windows
Windows note
On Windows the environment variable is set using the set command.
set DEBUG=*,-not_this
Note that PowerShell uses different syntax to set environment variables.
$env:DEBUG = "*,-not_this"
Then, run the program to be debugged as usual.
@h4n2k
h4n2k / gist:2ed39b4a7148a803eb825bcf4aad766a
Last active July 10, 2018 03:27
Changing Display Manager (login screen) lightdm to gdm - Antergos - Arch Linux
sudo pacman -Rcns lightdm
sudo pacman --needed -S gdm
sudo systemctl -f enable gdm
Reboot Your System
@h4n2k
h4n2k / gist:c5421afbb249aae6e0269c3067e5486a
Created August 16, 2017 03:24
change gnome window icon
$ gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'
$ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/DecorationLayout':<'close,minimize,maximize:'>}"
https://askubuntu.com/questions/656084/gnome-3-14-changing-window-icons-to-the-left
@h4n2k
h4n2k / gist:b9b2b790c9a8dce0e8385e4e4d85588c
Created July 27, 2017 03:48
break out of ssh when it locks
Enter ↵, ~, .
Supported escape sequences:
~. - terminate session
~B - send a BREAK to the remote system
~R - Request rekey (SSH protocol 2 only)
~# - list forwarded connections
~? - this message
~~ - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)
@h4n2k
h4n2k / app.js
Created June 15, 2017 05:22
Featherjs Error: request entity too large
...
.use(bodyParser.json({ limit: '50mb'}))
.use(bodyParser.urlencoded({ limit: '50mb', extended: true }))
...
@h4n2k
h4n2k / gist:4ef1aa37ac8ec0ebafa460b434fbd9bf
Last active June 11, 2017 23:44
Add PPPoE connections to network-manager-applet on arch linux
use this command to launch:
nm-connection-editor
@h4n2k
h4n2k / 60-g300s.rules
Last active August 23, 2017 04:08
Logitech g300s Arch Linux
SUBSYSTEM=="usb" MODE="0666" ATTR{idProduct}=="c246" ATTR{idVendor}=="046d" ATTR{ltm_capable}=="no" ATTR{manufacturer}=="Logitech" ATTR{maxchild}=="0" ATTR{product}=="G300s Optical Gaming Mouse"
@h4n2k
h4n2k / jsbeautifyrc.rb
Last active July 20, 2017 11:38
JS prettify setting (updated for js)
{
"e4x": true,
"brace_style": "collapse",
"break_chained_methods": true,
"end_with_newline": true,
"eval_code": false,
"indent_char": " ",
"indent_level": 0,
"indent_size": 2,
"indent_with_tabs": false,