Skip to content

Instantly share code, notes, and snippets.

@CSaratakij
CSaratakij / README.txt
Last active June 5, 2024 16:26
Video Wallpaper (hw-accelerate) : Use 'mpv' as a video player backend with 'xwinwrap' to wrap our window to be use as a desktop background
You want to use a live wallpaper in x11?
Great!!...but It come as a cost.
I did experiment with .gif backend and non hardware accelerate backend, It sucks.
CPU usage was so high (40% up just for idle), unacceptable for my laptop.
Running with those backend for such a really long time will slowly turn your laptop into the hot potato.
But don't be upset, we can reduce those cost.
Using the video player with hardware video decoding support can reduce the cost.
@frankie567
frankie567 / interactive_google_oauth2.py
Last active July 29, 2023 22:07
Interactive Google OAuth2 flow with Streamlit
import asyncio
import streamlit as st
from httpx_oauth.clients.google import GoogleOAuth2
st.title("Google OAuth2 flow")
"## Configuration"
client_id = st.text_input("Client ID")
@udkyo
udkyo / Dockerfile
Last active May 1, 2024 12:51
Basic container for X11 forwarding goodness
FROM ubuntu
RUN apt update \
&& apt install -y firefox \
openssh-server \
xauth \
&& mkdir /var/run/sshd \
&& mkdir /root/.ssh \
&& chmod 700 /root/.ssh \
&& ssh-keygen -A \
&& sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \
@voodoojello
voodoojello / i3-config
Last active May 29, 2020 18:09
i3 config files tweaked for Adwaita-Dark
#--------------------------------------------------------------------------
# i3 Config - Thu Aug 16 09:47:16 2018 -0500
# Tweaked for Adwaita-Dark (https://www.gnome-look.org/p/1014995/)
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# keybind vars
#--------------------------------------------------------------------------
# shift Shift_L (0x32), Shift_R (0x3e)
# lock Caps_Lock (0x42)

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@Brainiarc7
Brainiarc7 / xclip-copy-to-clipboard.md
Created April 26, 2017 17:53
Using xclip to copy terminal content to the clip board on Linux

Using xclip to copy terminal content to the clip board:

Say you want to pipe shell output to your clipboard on Linux. How would you do it? First, choose the clipboard destination, either the Mouse clip or the system clipboard.

For the mouse clipboard, pipe straight to xclip:

echo 123 | xclip

For the system clip board, pipe to xclip and select clip directly:

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active June 9, 2024 16:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@staltz
staltz / music.md
Last active September 29, 2023 15:42
coding music

Not for everyone. Each programmer has their own appreciation of what is good coding music.

For when I need to think deep, debug something, or design

(From most influential to least)

@medeirosthiago
medeirosthiago / force-gitignore.md
Last active April 24, 2022 17:19
Forcing .gitignore

Based on this stackoverflow's answer.

To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use:

git rm --cached filename

To untrack every file that is now in your .gitignore:

First commit any outstanding code changes, and then, run this command:

@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active April 25, 2024 15:14
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.