Skip to content

Instantly share code, notes, and snippets.

@niksumeiko
niksumeiko / git.migrate
Last active July 10, 2024 14:29
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@milanboers
milanboers / clone.bash
Last active July 15, 2024 17:14
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
@numberZero
numberZero / opengl_fragment.glsl
Created August 10, 2018 12:52
Trivial shaders for Minetest
uniform sampler2D baseTexture;
void main(void)
{
vec2 uv = gl_TexCoord[0].st;
vec4 base = texture2D(baseTexture, uv);
gl_FragColor = vec4(base.rgb * gl_Color.rgb, base.a);
}