Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / readme.md
Last active July 18, 2024 18:29
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

@edwardrf
edwardrf / gist:a7e8c170571730312d2e
Last active March 31, 2021 05:53
xmodmap config to map caps_lock to mode_switch and map mode_switch + ijkl to up left down right
#!/bin/bash
xmodmap -e "clear lock"
xmodmap -e "keysym Caps_Lock = Mode_switch Mode_switch"
xmodmap -e "keysym i = i I Up Up"
xmodmap -e "keysym k = k K Down Down"
xmodmap -e "keysym j = j J Left Left"
xmodmap -e "keysym l = l L Right Right"
xmodmap -e "keysym u = u U Home Home"
xmodmap -e "keysym o = o O End End"
xmodmap -e "keysym u = y Y Prior Prior"
@cirrusUK
cirrusUK / .Xresources
Last active April 3, 2024 11:19
termite emulator orange theme and other stuff
! __ ___ __ ___ ___ ___ _ _ _ __ ___ ___ ___
! \ \/ / '__/ _ \/ __|/ _ \| | | | '__/ __/ _ \/ __|
! _ > <| | | __/\__ \ (_) | |_| | | | (_| __/\__ \
!(_)_/\_\_| \___||___/\___/ \__,_|_| \___\___||___/
!
!## Colors
#define S_base03 #191919
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
@ccwang002
ccwang002 / 0_Background.md
Last active July 31, 2023 02:58
Lab Coding Instructions for Beginners

[TOC]

Lab Guide for Coding Beginners

亮亮(@ccwang002)| Mar, 2015 | CC 3.0 BY license

如果內容有誤,你可以用任何管道發訊息轟炸我,或用底下的 gist comment 留言。

學習方式

每個檔案都會是一個主題,主題底下會列出一些資源。資源的最後會有一個學習目標,方便讓你評估自己學到什麼程度。學習目標會給一個明確的任務,我盡量讓它能跟(宅宅的)日常生活結合。通常只要完成前一、二個目標就行了,這也不是功課所以不一定要給我看。如果你不介意給我看,我會分享我主觀的建議,但大部份的任務是沒有絕對的正確答案。只要能解決問題都是好方法。

Experimental attempt at getting organized ...

23/07/2024

FileTrove

FileTrove indexes files and creates metadata from them.

@manuhabitela
manuhabitela / keymap_leimi.c
Last active September 16, 2020 23:44
Layout GH60 RevCHN - spaceFN, ctrl on capslock, ISO missing key on fn layer
#include "keymap_common.h"
/* following https://gist.github.com/Leimi/bca49d02e48c018ce4c8 to flash firmware on GH60 RevCHN */
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* layer0: 60% qwerty with custom modifiers
* ESC instead of GRV, FN1 instead of LGUI, LGUI instead of LCTL, LCTL instead of CAPS, SPACEFN instead of SPACE */
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
@Neo-Oli
Neo-Oli / lighttpd.conf
Created December 20, 2016 20:43
lighttpd -D -f ~/.lighttpd/lighttpd.con
server.document-root = "/data/data/com.termux/files/home/www"
server.upload-dirs = ("/data/data/com.termux/files/home/.lighttpd/upload")
server.port = 8080
#load modules
server.modules = (
"mod_redirect",
"mod_auth",
#"mod_cgi",
"mod_accesslog",
@LordH3lmchen
LordH3lmchen / termux-url-opener
Last active May 8, 2024 15:27
termux-url-opener
#!/data/data/com.termux/files/usr/bin/bash
#
# This is a termux-url-opener script to do diffrent tasks on my Android phone
#
#
#
# How to use this script
#############################
#
# Install git
@dzcpy
dzcpy / debian-setup.sh
Last active November 21, 2023 00:47
Debian setup
#!/bin/sh
apt update
apt dist-upgrade -y
apt purge vim-tiny -y
apt install curl build-essential cmake pkg-config git zsh fonts-powerline apt-transport-https dirmngr sudo htop vim xz-utils net-tools socat -y
apt autoclean -y
userdel games
userdel lp
userdel news
userdel irc