Skip to content

Instantly share code, notes, and snippets.

View syxolk's full-sized avatar
🏠
Working from home

Hans syxolk

🏠
Working from home
  • Germany
View GitHub Profile
@BichengLUO
BichengLUO / mp4_to_gif.bash
Created February 7, 2018 23:30
An ffmpeg script to convert MP4 to GIF with high quality
ffmpeg -y -i input.mp4 -vf fps=10,scale=716:-1:flags=lanczos,palettegen palette.png
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=10,scale=716:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
@dvlden
dvlden / ffmpeg.md
Last active April 17, 2024 19:53
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. 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.
@random-person-001
random-person-001 / chordplot1.py
Created February 12, 2017 23:46
Plot some data as a filled chord graph in plotly with python, using essentially example code.
#
# Plot some data as a filled chord graph!
# The data labels will be '[label1] donated $[qty] to [label2].
#
# You should have plotly installed and set up for this to work.
#
# By Riley, Feb 2017, but almost all of it stolen from examples
# at https://plot.ly/python/filled-chord-diagram/
#
@SimplGy
SimplGy / renameToHash.sh
Last active July 27, 2023 07:30
Rename files with a hash based on their contents. eg: `abc.jpg` to `3101ace8db9f.jpg`. Useful for detecting duplicates.
#!/bin/bash
# TODO: skip tiny files (so small they couldn't be photos)
# TODO: make sure sym links and other file system oddities are handled
# TODO: look at paralellization for perf boost
#
# Constants
#
CHAR_COUNT=12
BLOCK_COUNT=6
@noelboss
noelboss / git-deployment.md
Last active April 25, 2024 10:38
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@alirobe
alirobe / reclaimWindows10.ps1
Last active April 23, 2024 06:15
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@dotob
dotob / d3-server.coffee
Created January 6, 2016 14:12
Directly render and serve d3 visualizations from a nodejs server.
# Start `coffee d3-server.coffee`
# Then visit http://localhost:1337/
# originally from: https://gist.github.com/Caged/6407459
d3 = require('d3')
http = require('http')
jsdom = require('jsdom')
http.createServer((req, res) ->
# Chrome automatically sends a requests for favicons
# Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
@macournoyer
macournoyer / Output
Last active January 9, 2023 15:12
A Neural Network framework in 25 LOC
$ python xor.py
Training:
Epoch 0 MSE: 1.765
Epoch 100 MSE: 0.015
Epoch 200 MSE: 0.005
* Target MSE reached *
Evaluating:
1 XOR 0 = 1 ( 0.904) Error: 0.096
0 XOR 1 = 1 ( 0.908) Error: 0.092
1 XOR 1 = 0 (-0.008) Error: 0.008
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.