Skip to content

Instantly share code, notes, and snippets.

View pdsouza's full-sized avatar
🤘

Preetam D'Souza pdsouza

🤘
View GitHub Profile
@sorahn
sorahn / Laws of Computer Programming.md
Last active September 15, 2023 17:54
COMPUTER© 1980 ART 101 Limited, Atlanta Georgia - Kenneth Grooms

laws of computer programming

  • any given program, when running, is obsolete.
  • if a program is useless, it will have to be documented.
  • if a program is useful, it will have to be changed.
  • any program will expand to fill all available memory.
  • the value of a program is proportional to the weight of its output.
  • program complexity grows until it exceeds the capability of the programmer to maintain it.
  • make it possible for programmers to write in english and you will find that programmers cannot write in english.

rules of pratt

@JesseRWeigel
JesseRWeigel / commands.txt
Created April 28, 2017 19:22
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@HopefulLlama
HopefulLlama / properties.groovy
Last active June 4, 2024 08:17
Print all properties of a Groovy object
println object.properties
.sort{it.key}
.collect{it}
.findAll{!['class', 'active'].contains(it.key)}
.join('\n')
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@ygotthilf
ygotthilf / jwtRS256.sh
Last active July 14, 2024 00:03
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@Vestride
Vestride / encoding-video.md
Last active June 5, 2024 14:38
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 16, 2024 16:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname