Skip to content

Instantly share code, notes, and snippets.

@tmgldn
tmgldn / inotify-instructions.md
Last active January 12, 2026 11:46
[Arch Linux] [Manjaro] How to avoid "Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

To avoid this error, we need to increase the inotify watcher limit.

The way to do this is different on Arch based distributions than other Linux distributions.

Instructions for Arch Linux/Manjaro

Check for an already existing inotify config file (recent versions of Manjaro include one)

@onlurking
onlurking / programming-as-theory-building.md
Last active March 7, 2026 01:02
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@luisenriquecorona
luisenriquecorona / handleImageData.js
Created November 2, 2019 01:17
Any data type that can be handled as a string by JavaScript can be sent. Here are functions that will take strings for JavaScript code, CSS styles, and images and convert them into resources the browser can use:
function handleImageData(data, mimeType) {
var img = document.createElement('img');
img.src = 'data:' + mimeType + ';base64,' + data;
return img;
}
function handleCss(data) {
var style = document.createElement('style');
style.type = 'text/css';
var node = document.createTextNode(data);
style.appendChild(node);
@nstarke
nstarke / 01-reversing-cisco-ios-raw-binary-firmware-images-with-ghidra.md
Last active December 10, 2025 04:11
Reversing Cisco IOS Raw Binary Firmware Images with Ghidra

Reversing Raw Binary Firmware Files in Ghidra

This brief tutorial will show you how to go about analyzing a raw binary firmware image in Ghidra.

Prep work in Binwalk

I was recently interested in reversing some older Cisco IOS images. Those images come in the form of a single binary blob, without any sort of ELF, Mach-o, or PE header to describe the binary.

While I am using Cisco IOS Images in this example, the same process should apply to other Raw Binary Firmware Images.

@jfet97
jfet97 / _objectsFlattening.js
Last active June 12, 2019 23:02
objects flattening
const obj = { a: { b: 1, c: 2, d: { e:4 , f:[1,2,3,4,5,6,7,8,9,0]} }, g:42 };
const res = Object.fromEntries(flatProps(objectRecursiveEntries(obj)));
/*
{
"a.b": 1,
"a.c": 2,
"a.d.e": 4,
"a.d.f.0": 1,
"a.d.f.1": 2,
@Morabaraba
Morabaraba / main.js
Created May 31, 2016 07:58
20 lines with marked.js and Mithril(Hacked only using ajax)
var s = window.location.search,
mdurl = s.substr(1) !== '' ?
s.substr(s.length - 1) === '/' ?
s.substr(1, s.length - 2) : s.substr(1, s.length - 1) : "md/index.md";
var md = m.request({
method: "GET",
url: mdurl,
deserialize: function(value) {
return value;
}
@jeremyyeo
jeremyyeo / sqlzoo-answers.sql
Last active March 7, 2020 03:42
Answers for sqlzoo.net tutorials
--http://sqlzoo.net/wiki/SELECT_from_Nobel_Tutorial
--1.
SELECT * FROM nobel WHERE yr = 1950
--2.
SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature'
--3.
SELECT yr, subject FROM nobel WHERE winner = 'Albert Einstein'
@PurpleBooth
PurpleBooth / README-Template.md
Last active March 12, 2026 19:44
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

@ishults
ishults / Grails_Groovy_Versions.txt
Last active February 16, 2026 14:37
List of Groovy versions for Grails
// Compiled by Igor Shults
// Last Updated: July 23, 2020
GRAILS GROOVY SOURCE
4.1.0 2.5.14 https://github.com/grails/grails-core/blob/v4.1.0/gradle.properties
4.0.4 2.5.6
4.0.3 2.5.6
4.0.2 2.5.6
4.0.1 2.5.6
4.0.0 2.5.6 https://github.com/grails/grails-core/blob/v4.0.0/build.gradle

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow 3G -l 600ms -p 10%   # slow network on eth0 and setup latency to 600ms packetloss to 10%
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency

slow dsl -b 1mbps # Simulate DSL with a slower speed than the default