Skip to content

Instantly share code, notes, and snippets.

View lucasdinonolte's full-sized avatar
:shipit:

Lucas Dino Nolte lucasdinonolte

:shipit:
View GitHub Profile
@lucasdinonolte
lucasdinonolte / glitcher.php
Created October 5, 2015 12:05
PHP based Image Glitcher
<?php
header('Content-Type: image/jpeg');
$contents = file_get_contents($_GET['img']);
$mutations = $_GET['mutations'];
for($i = 0; $i < $mutations; $i++) {
$contents = substr_replace($contents, str_shuffle("asdw4t98wfh9p8w3th98w3tsetf9wgt98hgt98rzt98hwz"), rand(strlen($contents)/10, strlen($contents)), 0);
@lucasdinonolte
lucasdinonolte / everything.pde
Created January 12, 2015 20:37
Trippy @daelzicht
// Run with AllInputsFirmata
import themidibus.*; //Import midibus library
import processing.serial.*; //Import serial library
import cc.arduino.*;
// Wanna use midi input?
boolean useMidi = false;
// Arduino Ports
int button = 7;
@lucasdinonolte
lucasdinonolte / table2.sass
Last active August 29, 2017 20:20
A collection of techniques for responsive tables
.c-table
+half-spacing(margin-bottom)
+text-copy-s
vertical-align: top
td,
th
+medium-spacing(padding)
vertical-align: top
border-bottom: 1px solid $border-color
@lucasdinonolte
lucasdinonolte / responsive.sass
Created August 5, 2014 17:35
Quick exemplary responsive SASS Setup
$max-page-width: 1600px
$min-page-width: 320px
$compact-max-page-width: 500px
$break-xsmall: 320px
$break-small: 480px
$break-medium: 700px
$break-large: 880px
$break-xlarge: 1280px
@lucasdinonolte
lucasdinonolte / BinomService.java
Created April 2, 2014 18:37
Some Java Action
// Das Resultat passt nicht, weil long 8 byte groß ist, also maximal 1.8446744e+19 sein kann
// 49! ist aber 6.0828186e+62 und passt nicht rein, also schneidet der die Bytes ab und das Ergebnis passt nicht mehr
public class BinomService {
public static void main(String[] args) {
System.out.println(binom(49, 6));
}
public static long fac(int n) {
if(n == 1) {
@lucasdinonolte
lucasdinonolte / gist:6998637
Created October 15, 2013 21:03
WordPress, loop over custom meta data of a post
<?php $customKeys = get_post_custom();
foreach($customKeys as $key => $value) {
if(substr($key, 0, 1) !== '_') {
?>
<h3><?php echo $key; ?></h3>
<p><?php echo $value[0]; ?></p>
<?php
}
}
?>
@lucasdinonolte
lucasdinonolte / Gemfile
Last active December 25, 2015 02:29
Getting Started Frontend Trail Solution
source 'https://rubygems.org'
gem 'compass'
gem 'modular-scale'
gem 'crispy-grid'
git clone [email protected]:targat/frontend-setup.git .
rm -rf .git
mkdir css
bundle install
@lucasdinonolte
lucasdinonolte / typos
Created November 23, 2012 13:47
Command Line Typo Generator (node.js based)
#!/usr/bin/env node
/**
* generateTypos
* Generate Typos from keywords
*
* @param array keywords
* @param bool wrongKeys
* @param bool missedChars
* @param bool transposedChars
@lucasdinonolte
lucasdinonolte / gimme.coffee
Created November 19, 2012 15:06
Nifty CLI Wrapper around Trustlinkers API
#!/usr/bin/env coffee
http = require "http"
domain = process.argv[2]
http.get "http://trustlinker.de/api/domain.json?url=#{domain}", (res) ->
res.setEncoding "utf8"
res.on "data", (data) ->
data = JSON.parse data