Skip to content

Instantly share code, notes, and snippets.

View jneuendorf's full-sized avatar

Jim jneuendorf

  • I4H Technologies UG
  • Berlin, Germany
View GitHub Profile
@yanqd0
yanqd0 / dl_requests_tqdm.py
Last active July 12, 2024 09:40
Python requests download file with a tqdm progress bar
import requests
from tqdm import tqdm
def download(url: str, fname: str, chunk_size=1024):
resp = requests.get(url, stream=True)
total = int(resp.headers.get('content-length', 0))
with open(fname, 'wb') as file, tqdm(
desc=fname,
total=total,
@fiznool
fiznool / fix-rn-xcode10.sh
Created October 30, 2018 11:59
Fixes the third party dependency issues introduced by Xcode 10's new build system.
#!/usr/bin/env bash
# Fix the third party mess. Run this after a `npm/yarn` install.
# This has (hopefully) been addressed by https://github.com/facebook/react-native/pull/21458,
# but at the time of writing (30/10/18) has not been merged into an official RN release.
echo "Fixing React Native third party folder..."
rm -rf ~/.rncache
WD=$(pwd)
cd node_modules/react-native
rm -fr third-party
@SeppPenner
SeppPenner / Installing Python 3.7.4 on Raspbian.rst
Last active May 9, 2024 21:52
Installing Python 3.7.4 on Raspbian

Installing Python 3.7.4 on Raspbian

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
@axe312ger
axe312ger / cleanup-dev-workstation.md
Last active March 15, 2022 11:55
Keep your developer system clean

Clean up your developer workstation

Free disk space on your development workstation by cleaning some caches

OSX/Brew

brew cleanup
@kigster
kigster / reduce-underscan.sh
Last active June 19, 2024 03:07
This shell script walks you through the steps required to change the monitor underscan or overscan value on OS-X, when the Display Preferences are not providing the underscan/overscan slider for a given display. This process was documented by Ishan Sharma here: http://ishan.co/external-monitor-underscan and is a part of BashMatic library.
#!/usr/bin/env bash
#
# Script to change underscan/overscan value of a monitor on OS-X.
# © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License.
#
#———————————————————————————————————————————————————————————————————————————————————————————
# EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS".
# OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR
# IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF
# MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

Get/set ID3 meta tags using ffmpeg

A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.

FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.

1. Read ID3 metadata

To list all global metadata tags for a media file, just set an input but no output file.

@puzzeljp
puzzeljp / file0.txt
Last active October 6, 2015 10:22
アップデートした El Capitan で Library not loaded: libmysqlclient.18.dylib (LoadError) と出る ref: http://qiita.com/puzzel/items/8768324d6c60417f4d6c
bin/rails:6: warning: already initialized constant APP_PATH
***/bin/rails:6: warning: previous
definition of APP_PATH was here Usage: rails COMMAND [ARGS]
The most common rails commands are: generate Generate new code
(short-cut alias: "g") console Start the Rails console (short-cut
alias: "c") server Start the Rails server (short-cut alias: "s")
dbconsole Start a console for the database specified in
config/database.yml
(short-cut alias: "db") new Create a new Rails application. "rails new my_app" creates a
@mandiwise
mandiwise / Count lines in Git repo
Last active July 4, 2024 16:56
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@grapswiz
grapswiz / brewfile
Last active October 25, 2023 15:45
Initial setup for Mac
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "robotsandpencils/made"
brew "anyenv"
brew "ffmpeg"
brew "git"
brew "git-lfs"