Skip to content

Instantly share code, notes, and snippets.

View tuupola's full-sized avatar

Mika Tuupola tuupola

View GitHub Profile
@andrejbauer
andrejbauer / mandelbrot.c
Created December 11, 2013 22:23
A simple program for computing the Mandelbrot set.
/*
This program is an adaptation of the Mandelbrot program
from the Programming Rosetta Stone, see
http://rosettacode.org/wiki/Mandelbrot_set
Compile the program with:
gcc -o mandelbrot -O4 mandelbrot.c
Usage:
@maoueh
maoueh / gist:8260199
Last active March 31, 2022 12:30
OpenELEC (4.0.1) WIFI connection details using `connman`

Even though there is a nice XBMC add-on to configure your WIFI settings, sometimes, you may still want to setup the WIFI connection for many reasons or just for fur.

OpenELEC use connman for managing connection to the various available network.

Setuping connman to connect to your protected WIFI network is an easy requiring you only to create a config file and enter some commands in a shell.

anonymous
anonymous / gist:8565929
Created January 22, 2014 19:42
There are a lot of complaints going around about Laravel these days, but a lot
of the important ones seem to be missing from the spotlight.
Bugfixes, issues and pull requests being left open for months with no
clarification of intent:
- https://github.com/laravel/framework/pull/1799
- https://github.com/laravel/framework/issues/1963
- https://github.com/laravel/framework/issues/2089
- https://github.com/laravel/framework/issues/2234
@AndrewDryga
AndrewDryga / reload_vb_kernel.sh
Created March 30, 2014 22:23
Shell script to rebuild VirtualBox kernel extensions under Mac OS X
#!/bin/bash
unload() {
if [ `ps -ef | grep -c VirtualBox$` -ne 0 ]
then
echo "VirtualBox still seems to be running. Please investigate!!"
exit 1;
elif [ `ps -ef | grep -c [V]ir` -gt 0 ]
then
echo "Stopping running processes before unloading Kernel Extensions"
@tschaefer
tschaefer / linux-error.txt
Created April 9, 2014 08:00
glibc linux error list
code[1] define[EPERM] str[Operation not permitted]
code[2] define[ENOENT] str[No such file or directory]
code[3] define[ESRCH] str[No such process]
code[4] define[EINTR] str[Interrupted system call]
code[5] define[EIO] str[Input/output error]
code[6] define[ENXIO] str[No such device or address]
code[7] define[E2BIG] str[Argument list too long]
code[8] define[ENOEXEC] str[Exec format error]
code[9] define[EBADF] str[Bad file descriptor]
code[10] define[ECHILD] str[No child processes]
@cferdinandi
cferdinandi / umd-script-boilerplate.js
Last active December 10, 2023 10:23
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {
@swrobel
swrobel / README.md
Last active May 25, 2018 21:25 — forked from denvazh/README.md
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 12:10
  • brew upgrade every day at 12:20

How to install

@geggleto
geggleto / index.php
Created January 26, 2016 22:29
slim 3 gist 7
<?php
$app->add(function ($req, $res, $next) {
//DO SOMETHING BEFORE THE REQUEST IS PROCESSED
$res = $next($req, $res); //PROCESS THE REQUEST
//DO SOMETHING AFTER THE REQUEST HAS BEEN PROCESSED
if ($res->getStatusCode() > 500) {
//Do something with a server error, maybe email someone or submit a bug report
}
@dev-zzo
dev-zzo / tutorial.md
Last active February 9, 2023 00:08
ChameleonMini fun

Getting it to work

The device is shipped with test firmware installed. To burn a proper firmware, you will need:

The instructions on the blog page are incorrect because Rev G hardware uses ATxmega128A4U instead of ATxmega32A4U. Why? Probably an outdated version of hardware.

@brainstorm
brainstorm / esp32_promisc.c
Last active March 3, 2025 21:31
esp32 promiscuous mode and packet injection experiments
// Espressif ESP32 promiscuous mode and packet injection experiments
// by brainstorm at nopcode org
#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "lwip/err.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"