Skip to content

Instantly share code, notes, and snippets.

View storbukas's full-sized avatar
:octocat:
01000111 01000101 01000101 01001011

Lars Erik Storbukås storbukas

:octocat:
01000111 01000101 01000101 01001011
View GitHub Profile
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active March 30, 2025 22:54
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@carljdp
carljdp / D1 Mini ESP8266.md
Last active December 4, 2024 00:54
Getting started with the D1 mini (ESP8266)

D1 Mini (ESP8266)

Wesmos D1 Mini

1. Getting Started

1.1. Install the IDE:

In any web browser:

  • From the Arduino website, download & install the latest Arduino IDE (v1.8 or later). Available for Windows, Mac, Linux & ARM.

1.2. Add the ESP8266 module libraries:

@85degree
85degree / updateip.lua
Created February 13, 2016 21:18
CloudFlare Dynamic DNS using OpenWRT
#!/usr/bin/lua
-- Original script: https://github.com/nileshgr/utilities/blob/master/general/updateip.lua
-- http://nileshgr.com/2015/09/23/cloudflare-dynamic-dns-using-openwrt
-- For use with openwrt since openwrt supports LUA.
-- Prerequisites:
-- luasec
-- luasocket
-- libubus-lua
@jesseschalken
jesseschalken / code_style.md
Last active March 30, 2025 03:15
Code style

My preferred code style is 2-space K&R. This is intended to provide a justification for this style.

Why K&R?

K&R style has the following properties:

  1. Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
  2. Forces no empty or meaningless lines, thereby avoiding artificial distance between related things that should be together.
  3. Consumes the minimum vertical space while keeping the opening and closing syntax of a block on separate lines from the content.
@PurpleBooth
PurpleBooth / README-Template.md
Last active March 31, 2025 12:36
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Jcpetrucci
Jcpetrucci / startup.sh
Last active January 23, 2018 08:22
Unseen DHCP client alert (DD-WRT)
#!/bin/sh
# Generates a syslog message w/ prio=emerg for any DHCP client we haven't seen since last reboot.
# Note: Syslog server is configured to send SMTP on any event >= emerg. This script alone does not send the mail.
echo '#!/bin/sh
op="${1:-op}"
mac="${2:-mac}"
ip="${3:-ip}"
hostname="${4}"
grep "$mac" /tmp/dnsmasq-leases.log || { export priority=emerg; echo "$mac" "$hostname" >> /tmp/dnsmasq-leases.log; }
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,
@rxaviers
rxaviers / gist:7360908
Last active March 31, 2025 21:10
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@parse
parse / shell.c
Created May 11, 2011 07:31
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>