Skip to content

Instantly share code, notes, and snippets.

View gabssnake's full-sized avatar

gabssnake gabssnake

  • Lyon
View GitHub Profile
@gabssnake
gabssnake / ipc.example.js
Created October 19, 2021 13:59 — forked from Xaekai/ipc.example.js
Example of Interprocess communication in Node.js through a UNIX domain socket
/*
**
** Example of Interprocess communication in Node.js through a UNIX domain socket
**
** Usage:
** server> MODE=server node ipc.example.js
** client> MODE=client node ipc.example.js
**
*/
@gabssnake
gabssnake / README.md
Created December 22, 2020 09:11 — forked from developius/README.md
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@gabssnake
gabssnake / Good taste.md
Created December 15, 2020 10:22 — forked from santisbon/Good taste.md
What makes good taste?

On Good Taste

Linus Torvalds in an interview talked about the idea of good taste in code or what I like to call elegance. As one might expect from two slides meant to make a point during a talk, he omits a lot of details to keep it short and simple. This post digs into the specifics of his example (deleting an element from a list) and adds another example (inserting an element in a list) including working code.

Example from Linus

This is an example of removing an element from a singly-linked list. It's one of the first data structures you learn about when you start learning about computer science and programming. The reason it doesn't show particularly good taste is because we have that condition at the end where we take a different action depending on whether the element we want to remove is at the beginning of the list or somewhere in the middle.

![Bad taste](http://

@gabssnake
gabssnake / naur.md
Created October 24, 2020 19:16 — forked from dpritchett/naur.md
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

(copied from http://alistair.cockburn.us/ASD+book+extract%3A+%22Naur,+Ehn,+Musashi%22)

Introduction

The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.

@gabssnake
gabssnake / tracker_blocking.rb
Created April 24, 2020 23:10 — forked from dhh/tracker_blocking.rb
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@gabssnake
gabssnake / .colors
Created December 15, 2019 00:01 — forked from daytonn/.colors
Bash Color functions
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
@gabssnake
gabssnake / scrdec18-VC8.exe
Created September 1, 2017 16:54 — forked from bcse/scrdec18-VC8.exe
Windows Script Decoder 1.8 (Decoding JScript.Encoded)

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

/**
* jQuery.support.cssProperty
* To verify that a CSS property is supported (or any of its browser-specific implementations)
*
* @param string p - css property name
* [@param] bool rp - optional, if set to true, the css property name will be returned, instead of a boolean support indicator
*
* @Author: Axel Jack Fuchs (Cologne, Germany)
* @Date: 08-29-2010 18:43
*
/* Copyright (c) 2011 Aza Raskin
|
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
| documentation files (the "Software"), to deal in the Software without restriction, including
| without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
| copies of the Software, and to permit persons to whom the Software is furnished to do so, subject
| to the following conditions:
|
| The above copyright notice and this permission notice shall be included in all copies or substantial portions
| of the Software.