Skip to content

Instantly share code, notes, and snippets.

View TangChr's full-sized avatar

Christian Tang TangChr

View GitHub Profile
@wuziq
wuziq / git diff patch between branches.md
Created November 13, 2020 23:13 — forked from patkujawa-wf/git diff patch between branches.md
If you want to get the difference between two branches as a diff patch

If you want to get the difference between two branches, say master and branch-name, use the following command: git diff master..branch-name

If you want that same diff in a patch, because patches are handy, just add the output redirect: git diff master..branch-name > branch-name.patch

If you need to import that patch into something like Crucible then you'll need to get rid of the a and b prefixes that git adds: git diff --no-prefix master..branch-name > branch-name.patch

@partydrone
partydrone / MyMedia.lua
Last active November 30, 2023 21:38
My default Simple ElvUI profile for World of Warcraft
----------------------------------------------------------------------------
-- Copy this section of the file to a file called MyMedia.lua, and enter
-- your media's information, using the examples shown below.
----------------------------------------------------------------------------
local LSM = LibStub("LibSharedMedia-3.0")
-- START of the section that you should be editing
--
-- NB: any line beginning with "--" is ignored - so the lines
@andrsd
andrsd / arch-mac-mini.md
Last active July 30, 2025 00:25
Install Arch linux on Mac Mini (late 2012)

Install Arch Linux on Mac mini

We will be creating dual boot for OS X and Linux with no special boot loader. For other setup, refer to [1]. We will keep all data on an external hard drive, so we do not need huge amount of space for the linux system. We will install from an USB thumb drive (will need at least 1GB in size), newer Minis do not have CD roms.

Prepare the disk in Mac OS X (El Capitan)

@StollD
StollD / Kopernicus-Pictures.md
Last active December 20, 2018 23:09
Cool pictures from Kopernicus planets - http://git.io/vWAFE

Asteroids with VertexPlanet (@ThomasKerman): Asteroids with VertexPlanet

Triangular Rings (@ThomasKerman): Triangular Rings

Asteroid with VertexPlanet and custom PQSMod (@ThomasKerman): Asteroid with VertexPlanet and custom PQSMod

Mini-Minmus (GregroxMun):

anonymous
anonymous / my.css
Created September 20, 2015 01:55
CSS Gradient Animation
background: linear-gradient(270deg, #ff0404, #ff9400, #f9ff00, #00ff15, #0600ff, #af00ff);
background-size: 1200% 1200%;
-webkit-animation: AnimationName 3s ease infinite;
-moz-animation: AnimationName 3s ease infinite;
-o-animation: AnimationName 3s ease infinite;
animation: AnimationName 3s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@joshuadavidnelson
joshuadavidnelson / remove-feeds.php
Last active May 26, 2017 23:33 — forked from chrisguitarguy/remove-feeds.php
Remove all feeds from WordPress
<?php
add_action( 'wp_head', 'remove_feeds_from_wp_head', 1 );
/**
* Remove feed links from wp_head
*/
function remove_feeds_from_wp_head() {
// Remove feed links
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
anonymous
anonymous / Wake up, Neo...reloaded.markdown
Created May 26, 2015 22:06
Wake up, Neo...reloaded
@jljorgenson18
jljorgenson18 / gist:d05d21e034de987e569a
Last active August 29, 2015 14:18
Finds an element using an id or a css class and smoothly scrolls to that element. Duration of the animation depends on scroll position. Based off of a stackoverflow answer by bfred.it at http://stackoverflow.com/questions/21474678/scrolltop-animation-without-jquery . NOTE: This only works for scrolling "up" to an element at the moment. The extra…
var scrollTo = function(id, cls, offset) {
var ele;
var targetOffset = 0;
var targetTop = 0;
if(offset) {
targetOffset = offset;
}
if(id) {
ele = document.getElementById(id);
anonymous
anonymous / Stylish-Social-Buttons.markdown
Created April 1, 2015 03:02
Stylish Social Buttons
@thesabbir
thesabbir / infinity.js
Created January 25, 2015 21:55
Infinite Scrolling
var lastPos = 0;
var scrolling = $('#scrolling-item');
scrolling.on('scroll', function () {
var height = scrolling.height();
var scrollHeight = scrolling[0].scrollHeight;
var scrollTop = scrolling.scrollTop()+1;
if (lastPos < scrollTop) {
if (scrollTop >= scrollHeight - height) {
console.log('Loading..');
}