Skip to content

Instantly share code, notes, and snippets.

View garoto's full-sized avatar
💭
All I wanted was an Atari 2600

garoto

💭
All I wanted was an Atari 2600
View GitHub Profile
@programus
programus / README-cdx.md
Last active October 15, 2020 06:59
Extended windows cd command

CDX Command - CD eXtension batch file

This is a batch file could help you change working directory easier especially you need to change many directories very often like me.

Features

  • Save histroy of all navigated directories
  • No duplicated directories in histroy
  • Name history directories
  • Jump into any directory in histroy by index or name
  • Quich jump into previous directory
  • Maintain history list
@haasn
haasn / image.lua
Last active March 11, 2024 06:57
mvi - set of configuration for turning mpv into an image viewer
-- Allow changing a property with by zoom-adjusted amount
function zoom_invariant_add(prop, amt)
amt = amt / 2 ^ mp.get_property_number("video-zoom")
mp.set_property_number(prop, mp.get_property_number(prop) + amt)
end
-- Resets the pan if the entire image would be visible
function zoom_check_center()
local zoom = mp.get_property_number("video-zoom")
local rot = mp.get_property_number("video-rotate") * math.pi / 180
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@subfuzion
subfuzion / global-gitignore.md
Last active April 23, 2024 22:47
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@Trefex
Trefex / OVH_README.md
Last active January 23, 2020 20:11
How I setup my VPS on ovh-com

Config is 2vCPU, 2 GB RAM and running Debian 7 on 64 bits.

apt-get update
apt-get upgrade
apt-get install htop

Add localadmin user

adduser localadmin

apt-get install sudo

@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream