Skip to content

Instantly share code, notes, and snippets.

View pomle's full-sized avatar

Pontus Alexander pomle

View GitHub Profile
@pomle
pomle / stabilize
Last active December 29, 2015 10:19
Stabilize script for /bin
#!/bin/bash
TEMP_BRANCH=temp/stabilize_master
git fetch origin master:$TEMP_BRANCH && git checkout $TEMP_BRANCH && git fetch origin testing:testing && git fetch origin stable:stable \
&& git checkout testing && git merge $TEMP_BRANCH \
&& git checkout stable && git merge testing \
&& git branch -d $TEMP_BRANCH
<?php
// Init
$PDO = new \PDO($dsn, $user, $pass);
$DB = new \Asenine\Database\Connection($PDO);
try {
$DB->begin();
// Simple execution
$DB->execute("UPDATE users SET
import mmap
import ctypes
GUI = 2
CUI = 3
# Take chrome.exe from the current directory
with open("chrome.exe", "r+b") as f:
map = mmap.mmap(f.fileno(), 1024, None, mmap.ACCESS_WRITE)
# DWORD field of IMAGE_DOS_HEADER
/* Offending method on #94 */
Engine.Collision = function()
{
this.objects = [];
this.collisionIndex = [];
this.positionCache = [];
this.collisionCount = 0;
this.collisionTests = 0;
var vertexShader = "varying vec2 vUv; void main() {vUv = uv;gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );}";
var fragmentShader = "uniform vec3 color; uniform sampler2D texture; varying vec2 vUv; void main() { vec4 tColor = texture2D( texture, vUv ); gl_FragColor = vec4( mix( color, tColor.rgb, tColor.a ), 1.0 );}";
var texture = THREE.ImageUtils.loadTexture( "sprites/stageselect.png");
var geometry = new THREE.PlaneGeometry(48, 48); // Is not visible.
var geometry = new THREE.SphereGeometry(32, 4, 4); // Is visible.
var material = new THREE.ShaderMaterial({
uniforms:{
uniform vec3 color1;
uniform vec3 color1;
uniform sampler2D texture;
varying vec2 vUv;
void main() {
vec4 tColor = texture2D( texture, vUv );
if (color == blue1) {
tColor = color1;
}
uniform vec3 sColor1;
uniform vec3 dColor1;
uniform vec3 sColor2;
uniform vec3 dColor2;
uniform sampler2D texture;
varying vec2 vUv;
void main() {
vec4 tColor = texture2D( texture, vUv );
if (tColor.x == sColor1.x && tColor.y == sColor1.y && tColor.z == sColor1.z) {
tColor.x = dColor1.x;
13:10:16 Started by upstream project "ha:AAAAmx+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzOEgZ+/az8JP3i5MSS3MQ8XSN9AOcVSrrEAAAAscatman-2" build number ha:AAAAnR+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAxmoBn6WflJ+sXJiSW5iXm6RvqGpsYApTlieccAAAA=153
13:10:16 originally caused by:
13:10:16 Started by upstream project "ha:AAAAmx+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzOEgZ+/az8JP3i5MSS3MQ8XUN9ACRGZ5HEAAAAscatman-1" build number ha:AAAAnR+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAxmoBn6WflJ
@pomle
pomle / install-deps.sh
Last active August 25, 2016 08:57
Setting up Karma Runner with MegamanJS
$ npm install karma \
karma-chrome-launcher \
karma-coverage \
karma-mocha \
karma-mocha-reporter
module.exports = function(_config) {
const dependencies = [];
dependencies.push('./src/lib/three.js');
dependencies.push('./test/browser-support/webgl-mock.js');
const projectFiles = require('./src/script-manifest.json').map(src => 'src/' + src);
dependencies.push(...projectFiles);