Skip to content

Instantly share code, notes, and snippets.

View mmathys's full-sized avatar
👽
专注

Max Mathys mmathys

👽
专注
  • Lakera AI
  • Zurich, Switzerland
  • 16:55 (UTC +02:00)
View GitHub Profile
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@retoheusser
retoheusser / angular-in-angular.md
Last active June 23, 2017 08:29
Multiple versions of Angular on the same Website

Multiple versions of Angular on the same Website

When developing JavaScript applications that need to be embedded into other websites that are controlled by other code than yours, you should be careful about what you expose globally and should prevent polluting the global namespace (the window object) as much as possible. This can rather easily be achieved with your own code. But what if you depend on third-party libraries such as jQuery, Lodash, Moment.js or Angular.js? All of these put themselves onto the window object regardless whether the original site is already using the same library, probably a different version. And you should just rely on exactly the versions you use within your code and not theirs nor should you overwrite their versions and potentially break their whole application.

I was facing all of these issues because my application needed to embedded into all kinds of environments which already use jQuery or lodash (very common) and even Angular. The Angular.js library even prevents lo

@mbostock
mbostock / .block
Last active January 14, 2023 04:21
Screen Recording to GIF
license: gpl-3.0
@alexanderGugel
alexanderGugel / crawler.js
Created July 19, 2014 07:26
BitTorrent DHT Crawler
// This file is part of github.com/Trrnts/Trrnts - an upcoming alternative to The Pirate Bay.
var bencode = require('bencode'),
dgram = require('dgram'),
hat = require('hat'),
_ = require('lodash'),
redis = require('../redis')(),
geoip = require('geoip-lite');
// Put in a function. The returned function won't ever throw an error. This is
@mhartington
mhartington / CustomTheme
Last active December 8, 2018 20:35
If you want to make a custom theme for ionic, and are using scss, this is a base to get you started
//Custom Theme test
// Colors
// -------------------------------
$custom: #057b6c !default;
// Buttons
// -------------------------------
$button-custom-bg: $custom !default;
@Hendrixer
Hendrixer / Gulpfile.js
Last active June 7, 2022 14:42
Gulpfile with Livereload, Nodemon, and other features
var gulp = require('gulp'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
server = require('tiny-lr')(),
refresh = require('gulp-livereload'),
mocha = require('gulp-mocha'),
stylus = require('gulp-stylus'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),
@meilhard
meilhard / whatthecommit.sh
Created September 27, 2013 15:12
Commit with whatthecommit.com message
git commit -am "`curl -s http://whatthecommit.com/index.txt`"
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D);
@tjb0607
tjb0607 / visualizer.py
Last active December 26, 2021 19:24
a 2D audio visualizer script for Blender 2.5+ (v0.3)
# To use this script, you must first change a few things.
# First, you'll want to change the filepath for the sound file.
# This is on line 76. Second, you might want to change the materials or the settings.
# To render this, you'll need to set the background color, enable Only Render on the display window, and render it with OpenGL (it's much faster and most optimal for 2D renders.)
# LICENSE = wtfpl
# VERSION = 0.3
import bpy
def makeMaterial(name, diffuse, alpha):