Skip to content

Instantly share code, notes, and snippets.

View schwittlick's full-sized avatar
🤗
wat

Marcel Schwittlick schwittlick

🤗
wat
View GitHub Profile

Twitter abuses all media file uploads, each type in its own way. If we want to upload a good looking animation loop from some low-color, high-detail generative art, we have to game their system's mechanisms.

  • don't upload a video file, they will re-encode it into absolute 💩

  • create a GIF, which they will auto-convert into a video file 😱

  • The frames of the GIF will be resized to an even-sized width using an extremely naive algorithm. Your GIF should be an even size (1000, 2000,

@kylemcdonald
kylemcdonald / Line Segment Intersection.ipynb
Created July 2, 2019 18:49
Python Line Segment Intersection example.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hamoid
hamoid / theme.txt
Last active March 3, 2023 03:11
Processing 3.5.4 IDE dark theme. See thread for 4.0 version (haven't tested it, 4.0b4 crashes for me).
# Processing 3.5.4 IDE - dark theme
# Updated version by @RandomGuy3015
# File location: processing-3.5.4/lib/theme.txt
# Make a backup of the original theme.txt
# Then replace it with this code
# Code colors can be adjusted in the preferences.txt file
@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@kylemcdonald
kylemcdonald / InboxUnread.php
Created August 12, 2013 12:57
Inbox Unread reports inbox statistics hourly in the form of a Twitter avatar.
<!--
Inbox Unread reports inbox statistics hourly in the form of a Twitter avatar.
To run Inbox Unread first copy this php script to your server. Put your background
avatar adjacent to this file as "input.jpeg". Mine is 548x548 and all the positions
are setup for that size. Next go to http://script.google.com/ and sign in. Click
"Create a script for GMail" and replace the template with this code:
function processInbox() {
var unreadCount = GmailApp.getInboxUnreadCount();
@atduskgreg
atduskgreg / hog_svm_hand_gesture_recognizer.pde
Created October 5, 2012 22:41
hand gesture recognizer example using Processing wrapper of libsvm and a Histogram of Oriented Gradients library
import hog.*;
import psvm.*;
PixelGradientVector[][] pixelGradients;
PImage img;
SVM model;
int[] labels; // 1 = A, 2 = B
String[] trainingFilenames, testFilenames;
float[][] trainingFeatures, testFeatures;
@SaitoWu
SaitoWu / Main.java
Created April 25, 2012 06:27
jgit example
class Main{
public static void main(String args[]){
String name = "Saito";
String password = "a1c2bf1890eb";
String url = "http://localhost:9292/Saito/simba.git";
// credentials
CredentialsProvider cp = new UsernamePasswordCredentialsProvider(name, password);
// clone
File dir = new File("/tmp/abc");
@kolber
kolber / pandoras_vox.mdown
Created March 20, 2012 05:23
pandora’s vox: on community in cyberspace

pandora’s vox: on community in cyberspace

by humdog (1994)

when i went into cyberspace i went into it thinking that it was a place like any other place and that it would be a human interaction like any other human interaction. i was wrong when i thought that. it was a terrible mistake.

the very first understanding that i had that it was not a place like any place and that the interaction would be different was when people began to talk to me as though i were a man. when they wrote about me in the third person, they would say “he.” it interested me to have people think i was “he” instead of “she” and so at first i did not say anything. i grinned and let them think i was “he.” this went on for a little while and it was fun but after a while i was uncomfortable. finally i said unto them that i, humdog, was a woman and not a man. this surprised them. at that moment i realized that the dissolution of gender-category was something that was happening everywhere, and perhaps it was only just very obvious on the ne

@aemkei
aemkei / LICENSE.txt
Last active June 4, 2024 07:51 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE