Skip to content

Instantly share code, notes, and snippets.

@abraithwaite
abraithwaite / chill-zoom.sh
Last active May 8, 2024 08:43
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
@carlssonk
carlssonk / deploy_node_do.md
Last active October 25, 2024 21:38
Deploy node.js app to DigitalOcean

Deploy Node.js Application to DigitalOcean

This step by step tutorial will show you how to set up a Node.js server with MongoDB to DigitalOcean using PM2, NGINX as reverse proxy and a SSL from LetsEncrypt. We will also add a custom domain name.

Prerequisites

Create Droplet & Generate SSH Key

@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@femto113
femto113 / generate.c
Last active March 3, 2019 01:29 — forked from munificent/generate.c
A random dungeon generator that (no longer) fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
// 2008-2019
const int H = 40;
const int W = 80;
int m[H][W];
int g(int x)
@noahp
noahp / dell-D6000-dock-ubuntu.md
Last active November 5, 2024 00:55
Dell Universal Dock D6000 on ubuntu
@michaeltreat
michaeltreat / psql_wsl_install.md
Last active May 7, 2024 21:14
Postgres WSL install instructions

Install psql on WSL

Home

This install is pretty different from previous versions of psql install instructions for windows. This install uses the WSL and Ubuntu shell.

We are installing this through the Ubuntu command line which is different from the other Ubuntu install instructions because those instructions use Ubuntu's GUI, which we don't have access to here.

NOTE: Since this is a service that is running on Ubuntu, you should be in the the Ubuntu file system when running these commands!

Install

@gwpl
gwpl / README.txt
Last active October 2, 2021 16:19
systemd.timer example: rsync_userx_to_remotey.sh rsync script example with pidfile and trap for the purpose of https://goo.gl/rzTJD1
Copy&Paste of : https://goo.gl/rzTJD1
self-link (web): https://goo.gl/rzTJD1
self-link (doc): https://goo.gl/kZDBHC
# linux userX -> remotey (only over local network)
Notes from setting rsync systemd.timer .
systemd.timers
references:
https://www.freedesktop.org/software/systemd/man/systemd.timer.html
https://www.freedesktop.org/software/systemd/man/systemd.unit.html
@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: