Skip to content

Instantly share code, notes, and snippets.

View tiivik's full-sized avatar
:shipit:
Building Ready Player Me

Rainer Selvet tiivik

:shipit:
Building Ready Player Me
View GitHub Profile
@tkanmae
tkanmae / aws-ec2-g2-instances-setup.md
Last active May 16, 2017 22:10
AWS EC2 g2 Instances setup
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo reboot

NVIDIA Driver

@albertstartup
albertstartup / setup.sh
Last active March 7, 2018 02:22
script to automatically setup nvidia driver 367.27, cuda 8, cudnn 5, on aws gpu
#!/bin/bash
set -o nounset
set -o errexit
# Required!
# downloads/ directory with:
# cuda_8.0.27_linux.run with md5 checksum: bea6165ccd0a6690cac04ed9544bbe57
# cudnn-8.0-linux-x64-v5.0-ga.tgz with md5 checksum: be1896b0db052a7ca06a062262c4b842
NVIDIA_FILENAME=NVIDIA-Linux-x86_64-367.27.run
@albertstartup
albertstartup / steps.sh
Last active December 26, 2017 21:18
aws gpu, ubuntu 16.04, nvidia driver 367, cuda 8,
# Required downloads:
# NVIDIA-Linux-x86_64-367.27.run
# cuda_8.0.27_linux.run
# cudnn-8.0-linux-x64-v5.0-ga.tgz
sudo apt-get install build-essential
sudo apt-get install linux-image-extra-`uname -r`
sudo ./NVIDIA-Linux-x86_64-367.27.run
./cuda_8.0.27_linux.run --extract=`pwd`/extracts
sudo ./extracts/cuda-linux64-rel-8.0.27-20733550.run
@melihme
melihme / soft_light_blend.py
Created November 7, 2015 01:13
Photoshop soft light blend with Numpy
import numpy as np
#https://en.wikipedia.org/wiki/Blend_modes#Soft_Light
def soft_light_blend(im1, im2):
nrm_im1 = im1/255.
nrm_im2 = im2/255.
res = np.zeros_like(nrm_im1)
xif = nrm_im2 < .5
xel = nrm_im2 >= .5
@Jawnnypoo
Jawnnypoo / BuildScript.cs
Last active December 5, 2023 12:54
Typical Buildscript for Unity on Jenkins. Run with command line args "-quit -batchmode -projectPath ${WORKSPACE} -executeMethod BuildScript.PerformAndroidBuild -logfile /dev/stdout"
using UnityEditor;
using System;
using System.Collections.Generic;
class BuildScript {
static string[] SCENES = FindEnabledEditorScenes();
static string APP_NAME = "AngryBots";
static string TARGET_DIR = "target";
@DavidYKay
DavidYKay / simple_cb.py
Last active February 13, 2025 13:54
Simple color balance algorithm using Python 2.7.8 and OpenCV 2.4.10. Ported from: http://www.morethantechnical.com/2015/01/14/simplest-color-balance-with-opencv-wcode/
import cv2
import math
import numpy as np
import sys
def apply_mask(matrix, mask, fill_value):
masked = np.ma.array(matrix, mask=mask, fill_value=fill_value)
return masked.filled()
def apply_threshold(matrix, low_value, high_value):
@daltonclaybrook
daltonclaybrook / cocoapods-bundle-id
Last active January 21, 2022 22:36
A post install script for CocoaPods that changes the bundle identifier of all pods to the one specified.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'BREnterprise'
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution: The Carter Group LLC'
config.build_settings['PROVISIONING_PROFILE'] = '${BR_ENTERPRISE_PROVISIONING_PROFILE}'
end
end
end
@thom-nic
thom-nic / Dockerfile
Created June 18, 2014 15:15
Node.js Dockerfile based on ubuntu 14.04. This is a little smaller than dockerfile/nodejs which depends on python
# Node.js app Docker file
FROM ubuntu:14.04
MAINTAINER Thom Nichols "[email protected]"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
@andrewmartin
andrewmartin / node-download.js
Created April 10, 2014 08:09
Download files with node.js
var fs = require('fs'),
stub = require('./stub'),
_ = require('underscore'),
request = require('request');
// config for local file
var basePath = "images/",
data = stub.data,
urlRoot = "http://cdn.catalogs.com/";