Skip to content

Instantly share code, notes, and snippets.

View Plasmoxy's full-sized avatar
🌃
hopefully sleeping

Sebastián Petrík Plasmoxy

🌃
hopefully sleeping
View GitHub Profile
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
@williamahartman
williamahartman / FrameRate.java
Created January 15, 2015 03:17
Display framerate in a LibGDX graphics window. Call update() and render() in your main render method.
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Disposable;
import com.badlogic.gdx.utils.TimeUtils;
/**
* A nicer class for showing framerate that doesn't spam the console
* like Logger.log()
@roachhd
roachhd / README.md
Last active May 7, 2024 01:28
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active March 12, 2024 07:34
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@Sythelux
Sythelux / Square.cpp
Last active July 25, 2022 19:13
Example GLFW,C++,OpenGL,GLEW Program
/******************************
*
* Example "Square"
* created by Syd
*
*******************************/
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <cstdlib>
@kyle-ilantzis
kyle-ilantzis / open-w-atom.reg
Last active June 1, 2021 17:20
Adds 'Open in Atom' to context menu in Windows Explorer.
Windows Registry Editor Version 5.00
;
; Adds 'Open in Atom' to context menu (when you right click) in Windows Explorer.
;
; Based on https://github.com/Zren/atom-windows-context-menu. It didn't work
; https://github.com/Zren/atom-windows-context-menu/issues/1.
;
; Save this file to disk with a .reg extension. Replace C:\\Atom\\atom.exe with
; the path to the atom executable on your machine.
@unnikked
unnikked / Brainfuck.java
Last active September 7, 2022 00:20
Tiny Brainfuck Interpreter Written in Java
import java.util.*;
public class Brainfuck {
private Scanner sc = new Scanner(System.in);
private final int LENGTH = 65535;
private byte[] mem = new byte[LENGTH];
private int dataPointer;
public void interpret(String code) {
int l = 0;
for(int i = 0; i < code.length(); i++) {
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 01:34
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@fairlight1337
fairlight1337 / hsvrgb-cpp
Created June 2, 2014 07:39
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
@pulkitsinghal
pulkitsinghal / sample.js
Last active April 16, 2021 02:53
Add user to role in Parse
var rolesQuery = new Parse.Query(Parse.Role);
rolesQuery.equalTo('name', 'someRole');
return rolesQuery.first({useMasterKey:true})
.then(function(roleObject){
var user = new Parse.User();
user.id = req.params.userId;
roleObject.getUsers().add(user);
return roleObject.save(null, {useMasterKey:true});
});