Skip to content

Instantly share code, notes, and snippets.

View humbertodias's full-sized avatar

Humberto Dias humbertodias

View GitHub Profile
@asus4
asus4 / DownloadManager.cs
Created April 25, 2012 14:32
Unity DownloadManager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/**
DownloadManager
@author koki ibukuro
*/
public class DownloadManager : MonoBehaviour , System.IDisposable {
// using classes
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
include(CMakeForceCompiler)
cmake_force_c_compiler(i686-w64-mingw32-gcc GNU)
cmake_force_cxx_compiler(i686-w64-mingw32-g++ GNU)
set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
set(CMAKE_RC_FLAGS -DGCC_WINDRES)
@andykorth
andykorth / gist:5100871
Created March 6, 2013 16:53
GLFW for C#
using System;
using System.Runtime.InteropServices;
public class GLFW {
// TODO: Obviously don't do this.
public const string GLFW_LIB = "/Users/kortham/lib/libglfw.dylib";
public static int WINDOW = 0x00010001;
@guifromrio
guifromrio / teamcity-agent-ubuntu.md
Last active October 21, 2022 12:35
Instructions to Setup Teamcity Agent on EC2 Ubuntu 12.04.2 Linux with NodeJS and PhantomJS
@jcubic
jcubic / init.java
Last active December 30, 2019 15:42
Reflection based JSON-RPC Servlet
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.lang.reflect.*;
import com.thetransactioncompany.jsonrpc2.*;
public class init extends HttpServlet {
public init() {
@nolanlawson
nolanlawson / completion-for-gradle.md
Last active April 5, 2024 07:43
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
@meng-hui
meng-hui / PerformBuild.cs
Last active April 20, 2022 07:44
Automated Unity Build from git repository to apk, xcode projects for use in conjunction with Jenkins. Contains Unity Editor script to collect the scenes, set the build settings, set the build location and an ant script to build the Unity project on the command line.
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
private static string BUILD_LOCATION = "+buildlocation";
@BertrandBordage
BertrandBordage / cat.asm
Created April 16, 2014 19:04
Command-line read file in X86_64 intel assembly for Linux
; À compiler avec nasm -felf64 cat.asm && ld cat.o -o cat
%define SYS_EXIT 60
%define SYS_READ 0
%define SYS_WRITE 1
%define SYS_OPEN 2
%define SYS_CLOSE 3
%define STDOUT 1
%define BUFFER_SIZE 2048
@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@mobmad
mobmad / gist:433ba54e9cb97d6d7771
Created March 24, 2015 21:37
Create self-signed certificate for wiremock and configure a java client under test for HTTPS

1. Generate self-signed certificate

keytool -genkey -alias wiremock -keyalg RSA -keysize 1024 \
    -validity 365 -keypass password -keystore identity.jks -storepass password

Important: keypass must equal storepass, or else you'll receive java.io.IOException: !JsseListener: java.security.UnrecoverableKeyException: Cannot recover key

2. Start wiremock with the new keystore and HTTPS enabled