Skip to content

Instantly share code, notes, and snippets.

View rkujawa's full-sized avatar

Radosław Kujawa rkujawa

View GitHub Profile
@wankdanker
wankdanker / ksmstat
Created September 9, 2011 18:12
bash script to calculate ksm stats in kb
#!/bin/bash
if [ "$1" != "" ]; then
echo "
----------------------------------------------------------------------------
http://www.kernel.org/doc/Documentation/vm/ksm.txt :
The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/:
@robinsmidsrod
robinsmidsrod / _README.md
Last active May 11, 2024 00:20
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
@ozaki-r
ozaki-r / cpsw.patch
Last active August 29, 2015 13:56
Patches for CKB-3352
Index: sys/arch/arm/omap/if_cpsw.c
===================================================================
RCS file: /cvs/cvsroot/src/sys/arch/arm/omap/if_cpsw.c,v
retrieving revision 1.4
diff -u -r1.4 if_cpsw.c
--- sys/arch/arm/omap/if_cpsw.c 18 Dec 2013 12:53:26 -0000 1.4
+++ sys/arch/arm/omap/if_cpsw.c 26 Feb 2014 02:44:33 -0000
@@ -122,6 +122,7 @@
bus_addr_t sc_rxdescs_pa;
struct ethercom sc_ec;
@ax3l
ax3l / CUDA_Compilers.md
Last active July 25, 2024 12:35
CUDA Compilers
@cr1901
cr1901 / Makefile
Last active July 1, 2018 14:43
NetBSD Raspberry Pi I2C IOCTL Sample
CFLAGS=
CPPFLAGS=
LDFLAGS=
LIBS=
LIBPATH=
RM=rm
RMFLAGS=-f
INSTALL=install
@cr1901
cr1901 / Makefile
Last active September 5, 2018 22:39
NetBSD RPi i2c sample code
CFLAGS=
CPPFLAGS=
LDFLAGS=
LIBS=
RM=rm
RMFLAGS=-f
INSTALL=install
i2ceprog: i2ceprog.c
@graemerocher
graemerocher / migrate-jira-to-github-issues.groovy
Last active March 26, 2024 00:09
JIRA to Github Issues Migration Script
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
@Grab(group='joda-time', module='joda-time', version='2.7')
import wslite.rest.*
import org.joda.time.*
import org.joda.time.format.*
import groovy.xml.*
import groovy.json.*
import static java.lang.System.*
import groovy.transform.*
@bnagy
bnagy / gpgmutt.md
Last active July 7, 2024 08:18
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@marek-saji
marek-saji / record-gif
Last active October 9, 2015 14:15
Select area on the screen and record it as a GIF
#!/bin/sh
# Select area on the screen and record it as a GIF.
# Running for the second time stops recording, so it's suitable for
# assigning to a key.
set -e
getbin ()
{
BIN="$( which "$1" || which "$( dirname "$0" )/$1" )"