Skip to content

Instantly share code, notes, and snippets.

View WenxiJin's full-sized avatar
🎯
Focusing

HvidPanda WenxiJin

🎯
Focusing
  • Sophion Bioscience A/S
  • Denmark
View GitHub Profile
@steventrux
steventrux / Chromecast batch conversion script
Last active May 27, 2021 22:56
A bash script to batch convert video files for chromecast compatibility
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space
@kvnsmth
kvnsmth / example-subtree-usage.md
Last active March 5, 2023 21:58
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@ymasory
ymasory / emacs-whitespace-long-lines.md
Created September 27, 2012 15:44
configuring emacs to show whitespace and long line problems

Configuring emacs for long line & whitespace detection

Goals

For a few years now I've been trying to get emacs to alert me, somehow, to:

  • lines longer than 80 characters
  • literal tabs (\t)
  • carriage returns (\r)
  • trailing whitespace at the end of a line ([ ]+$)

I've tried many strategies, but usually the result was something I found a little too intrusive, or difficult to manage.

@austinmarton
austinmarton / sendRawEth.c
Created February 27, 2012 08:40
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done