This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! -d .git ]; then | |
echo ERROR: Please run this in the root of the git repository | |
exit 1 | |
fi | |
cat > .gitignore <<'EOF' | |
# CVS global ignores | |
RCS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample implementation of a Shutdownable object. | |
*/ | |
public class SampleImpl implements Shutdownable { | |
public static void main(String[] args) { | |
SampleImpl sample = new SampleImpl(); | |
// Make the JVM call our shutdown() method upon exit. | |
ShutdownHook.registerForShutdownHook(sample); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Thanks goes to @pete-otaqui for the initial gist: | |
# https://gist.github.com/pete-otaqui/4188238 | |
# | |
# Original version modified by Marek Suscak | |
# | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" or even "1.2.3-beta+001.ab" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _CRC16_TABLE_H__ | |
#define _CRC16_TABLE_H__ | |
/* A table of the shortest possible alphanumeric string that is mapped by redis' crc16 | |
* to any given redis cluster slot. | |
* | |
* The array indexes are slot numbers, so that given a desired slot, this string is guaranteed | |
* to make redis cluster route a request to the shard holding this slot | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |