Skip to content

Instantly share code, notes, and snippets.

View KitsuneAlex's full-sized avatar
🦊
YIP YAP YOP

Alexander Hinze KitsuneAlex

🦊
YIP YAP YOP
View GitHub Profile
@katylava
katylava / git-selective-merge.md
Last active February 27, 2024 10:18
git selective merge

Update 2022: git checkout -p <other-branch> is basically a shortcut for all this.

FYI This was written in 2010, though I guess people still find it useful at least as of 2021. I haven't had to do it ever again, so if it goes out of date I probably won't know.

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active November 14, 2024 23:06
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@kwk
kwk / README.md
Created October 1, 2014 13:52
Forgot to sign-off commits?

No problem,

run

git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name <[email protected]>'" HEAD~2..HEAD

To sign-off the last two commits.

Then force to push them to the remote repo with the -f option:

@jjrom
jjrom / Apache
Last active November 24, 2023 02:45
Enable compression on Apache server
Add this to apache configuration file (not in .htaccess !)
<Location />
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:mp3|wav|wma|au|m4p|snd|mid|wmv|mpg|mpeg|mp4|qt|mov)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|gz2|sit|rar)$ no-gzip dont-vary
</Location>
@fernandezpablo85
fernandezpablo85 / git-maven-howto.md
Last active September 22, 2024 11:36
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone [email protected]:ORGANIZATION/PROJECT.git my-repository

Cd into it

@matthewprenger
matthewprenger / signjars.md
Last active April 21, 2022 20:53
A simple tutorial on setting up jar signing with ForgeGradle 2

Signing Your Jar

Signing your jar can help you and your users verify that the jar they have is an authentic jar created by you. This will help a lot, but is not 100% effective. If someone really wants to get around it, they can.

Creating a keystore

Let's start off by creating a new keystore. A keystore is the private database file that holds the information needed to sign a jar. This command requires a correctly setup Java Development Kit.

keytool -genkey -alias Matthew -keyalg RSA -keysize 2048 -keystore keystore.jks
@mstroeck
mstroeck / DesktopToastsSample.cpp
Last active June 21, 2024 12:49 — forked from CalvinLinTrend/DesktopToastsSample.cpp
Toast Notification in Win32 app with COM server
#include "stdafx.h"
#include <wrl/module.h>
#include "ToastNotificationActivationCallback.h"
#include "DesktopToastsSample.h"
// This is taken from: http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/10/16/quickstart-handling-toast-activations-from-win32-apps-in-windows-10.aspx
DWORD g_allLocks;
// Main function
@UnaNancyOwen
UnaNancyOwen / find_avx.cmake
Last active July 22, 2024 17:58
Check for the presence of AVX and figure out the flags to use for it.
# Check for the presence of AVX and figure out the flags to use for it.
macro(CHECK_FOR_AVX)
set(AVX_FLAGS)
include(CheckCXXSourceRuns)
set(CMAKE_REQUIRED_FLAGS)
# Check AVX
if(MSVC AND NOT MSVC_VERSION LESS 1600)
set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
import java.io.FileDescriptor;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
public class Jes {
@kimwalisch
kimwalisch / int128.h
Created November 22, 2017 12:25 — forked from Bananattack/int128.h
A signed 128-bit integer type. Internally stores its data in Two's Complement within two unsigned 64-bit integer parts. Still needs more testing, but basic implementation is fairly complete.
#ifndef WIZ_UTILITY_INT128_H
#define WIZ_UTILITY_INT128_H
#include <cassert>
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <string>