🏳️⚧️
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
using System; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
using System.Drawing; | |
/// <summary> | |
/// Enable Aero style on Windows 10. | |
/// Refrences: | |
/// https://gist.github.com/ysc3839/b08d2bff1c7dacde529bed1d37e85ccf, | |
/// https://gist.github.com/riverar/fd6525579d6bbafc6e48, |
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
language: java | |
services: | |
- docker | |
before_install: | |
- echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" -u "$DOCKER_USERNAME" --password-stdin | |
- ./gradlew exportVersion | |
- export VERSION=$(cat version.txt) | |
- export VERSION_CODE=$(cat version_code.txt) | |
script: | |
- docker build -t "$DOCKER_REGISTRY"/"$DOCKER_IMAGE_NAME":"$VERSION" . |
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 | |
# For Ubuntu (not CoreOS) | |
# Execute: curl -fsSL https://gist.github.com/Trumeet/f37b11a4687904e8460761f7d3775575/raw -o - | sh - | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
sudo usermod -aG docker $(whoami) |
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 | |
# License: WTFPL | |
# References vary. | |
# Usage: curl -fsSL https://gist.github.com/Trumeet/53159d1f45e27bec091978da57132d23/raw -o - | sh - | |
trap '' SIGINT | |
center() { | |
termwidth="$(tput cols)" | |
padding="$(printf '%0.1s' ={1..500})" |
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
import java.util.*; | |
/** | |
* Cosmic Number | |
* License: Unlicensed | |
**/ | |
public class Main { | |
private static final int BILLION = 1000000000; | |
private static final int MILLION = 1000000; | |
private static final int THOUSAND = 1000; |
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
$ShellAbout = @' | |
[DllImport("Shell32.dll")] | |
public static extern int ShellAbout(IntPtr hwnd, string szApp, string szOtherStuff, IntPtr hIcon); | |
'@ | |
$Shell32 = Add-Type -MemberDefinition $ShellAbout -Name 'Shell32' -Namespace 'Shell32' -PassThru | |
$Shell32::ShellAbout(0, "Windows", "", 0); |
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 | |
export MOUSE_LEFT=1 | |
export MOUSE_RIGHT=2 | |
export KEY_ESCAPE=Escape | |
# Settings | |
export MC=$1 | |
SCRIPT=$2 |
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
/* | |
* Shutdown the system properly when Azure evicts your Spot instance. | |
* | |
* Compile: | |
* Requires libcurl 4 and json-c 5 headers. | |
* cc -Wall -Werror -lcurl -ljson-c main.c | |
* | |
* Running: | |
* Requires `shutdown` command and the rights to execute it. | |
* Requires libcurl.so.4, libjson-c.so.5, and glibc. |
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
import org.jcodec.api.FrameGrab; | |
import org.jcodec.common.io.NIOUtils; | |
import org.jcodec.common.model.Picture; | |
import org.jcodec.scale.AWTUtil; | |
import java.awt.image.BufferedImage; | |
import java.io.*; | |
import javax.sound.sampled.AudioInputStream; | |
import javax.sound.sampled.AudioSystem; | |
import javax.sound.sampled.Clip; |
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
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.geom.Path2D; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.stream.Collectors; | |
/** |