Skip to content

Instantly share code, notes, and snippets.

Danny Boisvert silverkorn

Block or report user

Report or block silverkorn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@silverkorn
silverkorn / hide-terminal.vbs
Last active Nov 5, 2018
Hide terminal pop up on Windows, like for Node's `pkg` binary output.
View hide-terminal.vbs
Dim objShell, objFSO, objFile, strArguments
Set objShell = WScript.CreateObject("WScript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(WScript.ScriptFullName)
For Each strArgument in WScript.Arguments
strArguments = strArguments & " " & strArgument
Next
objShell.Run """" & objFSO.GetParentFolderName(objFile) & "\" & objFSO.GetBaseName(WScript.ScriptFullName) & ".exe""" & strArguments, 0, False
View hexToShaderVec3.js
var fs = require('fs');
filename = process.argv[2];
var data = fs.readFileSync(filename);
var arr = data.toString().split('\n');
var returnString = '';
returnString = 'const vec3 palette[' + (arr.length - 1) + '] = vec3[]( ';
for(var i in arr){
if(arr[i].length > 5){
if(i > 0){
@silverkorn
silverkorn / godot-cross-compile.sh
Last active Aug 30, 2019
Godot Engine cross-compiling helper attempt for Linux x11 ARM (and potentially others).
View godot-cross-compile.sh
#!/usr/bin/env bash
function usage() {
echo "Usage: $(basename $0) TARGET_ARCH TARGET_OS [SCONSOPTS]"
echo "Helper to cross-compile Godot game engine [https://godotengine.org/] on other Linux architectures.".
echo
echo "The TARGET_ARCH is the target architecture/device to compile to."
echo " List of available TARGET_ARCH"
echo " rpi2"
echo " rpi3"
@silverkorn
silverkorn / symlink.cmd
Created Aug 30, 2017
Simple Windows executable symlink workaround
View symlink.cmd
@silverkorn
silverkorn / generate-ssl.sh
Last active Apr 10, 2019
Create a SAN SSL Certificate from a config file under the name of `openssl.conf`. The name of the directory will be used as the default `commonName`.
View generate-ssl.sh
#! /bin/bash
##########
# Config #
##########
TMP_SSL_CERTIFICATE_NAME=$(basename "($(dirname "$(realpath "$0")")")
TMP_SSL_CERTIFICAT_RSA_BITS=3072
TMP_SSL_CERTIFICAT_GENERATE_SELFSIGNED=1
TMP_SSL_CERTIFICAT_SELFSIGNED_VALID_DAYS=1095
#########
@silverkorn
silverkorn / putty-schema.js
Last active Aug 7, 2017
A way to make PuTTY load the host with the protocol in the parameter. Supports login name and password.
View putty-schema.js
var sExecutable = 'putty.exe';
var oShell = WScript.CreateObject("WScript.Shell");
var oFSO = WScript.CreateObject("Scripting.FileSystemObject");
var oFile = oFSO.GetFile(WScript.ScriptFullName);
var sExecutableFullPath = '"' + oFSO.GetParentFolderName(oFile) + "\\" + sExecutable + '"';
if(WScript.Arguments.length > 0){
var sArg = WScript.Arguments(0);
var aCmd = [];
var oCmd = {
'executable': sExecutableFullPath,
@silverkorn
silverkorn / ffmpeg-nonfree-build-ubuntu-16.04.sh
Last active Jan 17, 2020
An automated script to build FFmpeg non-free on Debian/Ubuntu with as much features as possible. (Including mediainfo for debugging) Raw
View ffmpeg-nonfree-build-ubuntu-16.04.sh
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@silverkorn
silverkorn / ffmpeg-nonfree-build-centos-7.sh
Last active Dec 25, 2018
An automated script to build FFmpeg non-free on RHEL/CentOS with as much features as possible. (Including mediainfo for debugging)
View ffmpeg-nonfree-build-centos-7.sh
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@silverkorn
silverkorn / connect-ssh-agent.cmd
Last active Oct 8, 2015
Starting or recycling SSH agent from Cygwin for Windows
View connect-ssh-agent.cmd
:: Start or recycle SSH agent
@echo off
:: Set the SSH_KEY if passed by argument, otherwise, use default file
IF NOT "%1" == "" (
SET SSH_KEY=%1
) ELSE IF "%SSH_KEY%" == "" (
SET SSH_KEY=%USERPROFILE%\.ssh\id_rsa
)
@silverkorn
silverkorn / install-gitflow-avh.sh
Last active Aug 29, 2015
Gitflow (incl. AVH Edition) installer for Git For Windows
View install-gitflow-avh.sh
#!/bin/bash
# Gitflow (AVH Edition) installer for Git For Windows, by Danny Boisvert
# Licensed under the same restrictions as git-for-windows' build-extra:
# http://github.com/git-for-windows/build-extra/blob/master/git-extra/PKGBUILD
echo
echo "Installing Gitflow (AVH Edition) & Gitflow (AVH Edition) completion..."
echo
You can’t perform that action at this time.