Skip to content

Instantly share code, notes, and snippets.

@Overbryd
Overbryd / hacking-club-mate-imatate.md
Created June 22, 2011 13:46
Hacking Club Mate "imatate"

Hacking Club Mate "imatate"

Read about the end result here

Join me when I start brewing my first batch of Club Mate. Inspired by a podcast from chaos radio express on the topic "Hackerbrausen" (Hacker's soda, listen here) I want to try this by myself.

So far I have bought all the necessary ingrediends and tools to get started. And with the help from Jan (@janl) I can even carbonate the end result :)

When? Where?

@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

#include "sdk30.h"
#include "ip_.h"
#include "timer.h"
#define UDP 0
int logSockData(char* data, int Size, struct sockaddr_in *from);
int isMoreLogSize(int size);
int openLogFile(void);
void setMyEthParams(char eth_str[32]);
# Copyright Carve Systems 2015
#
# LICENSE: If you use this code, and it helped you learn or accomplish a goal,
# please let us know. We would love to hear from you.
# Keep our numbers clean and such
def toint32(val):
return val & 0xffffffff
def toint16(val):
@pdp7
pdp7 / OLED-W-Click-MikroBus.ino
Last active January 31, 2020 07:13
OLED W click with MikroBus shield on Arduino UNO R3
/*********************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/category/63_98
This example is for a 128x32 size display using SPI to communicate
4 or 5 pins are required to interface
Adafruit invests time and resources providing this open source code,
@totoCZ
totoCZ / caddy.sh
Last active August 1, 2018 21:31
caddy for SELinux
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
nano /etc/systemd/system/caddy.service
semanage fcontext -a -t httpd_exec_t /usr/local/bin/caddy
restorecon /usr/local/bin/caddy
chown www-data:www-data /etc/ssl/caddy/
semanage fcontext -a -t httpd_sys_rw_content_t /etc/ssl/caddy
restorecon /etc/ssl/caddy
@Jon-Schneider
Jon-Schneider / wav_header.h
Created November 29, 2016 15:59
C Wav Header Struct
// WAV header spec information:
//https://web.archive.org/web/20140327141505/https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
//http://www.topherlee.com/software/pcm-tut-wavformat.html
typedef struct wav_header {
// RIFF Header
char riff_header[4]; // Contains "RIFF"
int wav_size; // Size of the wav portion of the file, which follows the first 8 bytes. File size - 8
char wave_header[4]; // Contains "WAVE"
@nickoala
nickoala / orbslam2_ubuntu_mate.md
Created December 12, 2016 12:20
Build ORB-SLAM2 on Raspberry Pi 3

Build ORB-SLAM2 on Raspberry Pi 3

Operating system: Ubuntu Mate 16.04

I use Ubuntu Mate instead of the usual Raspbian Jessie mainly because of the gcc version. ORB-SLAM2 requires C++11 support. Raspbian comes with gcc 4.9, which does not handle C++11 by default. That means you have to play around with some compiler flags in ORB-SLAM2's CMakeLists.txt to make it work. In contrast, Ubuntu Mate's gcc 5.4 handles C++11 naturally.

@Spl3en
Spl3en / rol_ror.c
Created February 21, 2017 21:11
rol / ror gcc
inline int rol (int in, int x) {
int res;
__asm__ __volatile__("rol %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x));
return res;
}
inline int ror (int in, int x) {
int res;
__asm__ __volatile__("ror %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x));
@Yatoom
Yatoom / setup.md
Last active June 16, 2024 01:14
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan