git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
# from http://www.debuntu.org/how-to-redirecting-network-traffic-a-new-ip-using-iptables | |
# enable ip forwarding until reboot | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
# enable ip forwarding after reboot | |
# edit /etc/sysctl.conf | |
# uncomment line: #net.ipv4.ip_forward=1 | |
;; Objective | |
;; 1. Learn Clojure by doing Clojure | |
;; | |
;; Pre-requisites | |
;; You need to have a running Clojure REPL | |
;; see: http://clojure.org/getting_started | |
; Hello World in Clojure | |
(println "Hello World") |
const int c = 261; | |
const int d = 294; | |
const int e = 329; | |
const int f = 349; | |
const int g = 391; | |
const int gS = 415; | |
const int a = 440; | |
const int aS = 455; | |
const int b = 466; | |
const int cH = 523; |
git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
/* | |
Minimal SDL2 + OpenGL3 example. | |
Author: https://github.com/koute | |
This file is in the public domain; you can do whatever you want with it. | |
In case the concept of public domain doesn't exist in your jurisdiction | |
you can also use this code under the terms of Creative Commons CC0 license, | |
either version 1.0 or (at your option) any later version; for details see: | |
http://creativecommons.org/publicdomain/zero/1.0/ |
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 localhost |
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}); | |
}); |
// Copyright (c) 2014, Jan Winkler <[email protected]> | |
// 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 |
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
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
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++) { |