Skip to content

Instantly share code, notes, and snippets.

View eduuh's full-sized avatar
🎯

dushg eduuh

🎯
  • Nairobi
  • 08:24 (UTC +03:00)
View GitHub Profile
@eduuh
eduuh / remaps
Last active June 19, 2020 19:37
#!/bin/sh
# This script is called on startup to remap keys.
# Increase key speed via a rate change
xset r rate 300 50
setxkbmap us -variant colemak # set up the default keyboard layout to colemak
# make CapsLock behave like Ctrl:
setxkbmap -option ctrl:nocaps
# make short-pressed Ctrl behave like Escape:
xcape -e 'Control_L=Escape'
#!/bin/sh
# This script is called on startup to remap keys.
# Increase key speed via a rate change
xset r rate 300 50
setxkbmap us -variant colemak # set up the default keyboard layout to colemak
# Map the caps lock key to super...
setxkbmap -option caps:super
# But when it is pressed only once, treat it as escape.
killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape'
@eduuh
eduuh / remove-node-modules.md
Created July 22, 2020 16:15 — forked from lmcneel/remove-node-modules.md
How to remove node_modules after they have been added to a repo

How to remove node_modules

  1. Create a .gitignore file in the git repository if it does not contain one

touch .gitignore 2. Open up the .gitignore and add the following line to the file

node_modules 3. Remove the node_modules folder from the git repository

const http = require('http');
const fs = require('fs');
// the http module has a createServer method.
// Takes 1 arg
// 1. callbacks, callbacks, has 2 args: req, res
const server = http.createServer((req, res) => {
if (req.url === '/') {
//res = ouw way of responding to the requester.
//http message.
//1. start line check
[
{
"name": "Advanced Git Workshop",
"instructor": "Edwin Kamau",
"description": "level up your Git Skills",
"website": "https://eduuh.codes",
"phone": "(333) 333-3333",
"email": "[email protected]",
"address": "Dkut Kenya",
"careers": ["Web Development", "Data Science", "Business"],
@eduuh
eduuh / node_nginx_ssl.md
Created September 25, 2020 14:44 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@eduuh
eduuh / tmux.md
Created November 7, 2020 05:49 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@eduuh
eduuh / emulator-install-using-avdmanager.md
Created November 10, 2020 08:02 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@eduuh
eduuh / keybindings.md
Created December 22, 2020 11:40 — forked from inscapist/keybindings.md
VSCode omni-navigation with ctrl-hjkl (window navigation), ctrl-n/p (list navigation), cmd-hjkl (tab navigation)
[
  // ===================================================
  // window navigation
  {
    "key": "ctrl+h",
    "command": "workbench.action.navigateLeft"
  },
  {
    "key": "ctrl+l",
#### Functional requirements.
1. Mantain a library of albums/songs.
2. Allow users to browse albums/songs.
3. Allow users to select individual songs.
4. Prevent user from selecting entire albums.
5. Maitain a queue of song to play.
6. Play music.
7. Allow users to sort by artist.