Skip to content

Instantly share code, notes, and snippets.

View Xitsa's full-sized avatar

Stas Bushuev Xitsa

View GitHub Profile
@hzoo
hzoo / naur.md
Last active July 9, 2022 15:28 — forked from dpritchett/naur.md
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

PDF: http://pages.cs.wisc.edu/~remzi/Naur.pdf

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.

@jonnyparris
jonnyparris / prepare-commit-msg.sh
Last active April 10, 2024 20:16 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with the Jira ticket reference from a branch name
#!/bin/bash
# For instance with feature/add_new_feature_HEYT-653
# $ git commit -m"Fixed bug"
# will result with commit "[HEYT-653] Fixed bug"
# Customize which branches should be skipped when prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
@ap0llo
ap0llo / Export-VisioDrawing.ps1
Last active March 13, 2024 06:53
Powershell script that exports Visio drawings in the current directory to png
# Powershell script that exports visio drawings to png
# Based on a F# script with the same purpose which can be found at
# http://stackoverflow.com/questions/1145269/visio-to-image-command-line-conversion
$outputFormat = ".png"
$inputFilePattern = "*.vsdx"
# Load Visio Interop Assembly
[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Visio") > $null
@gujiaxi
gujiaxi / savedio-import.py
Created August 31, 2016 02:37
Import bookmarks to http://saved.io/
import requests
f = open('./bookmarks.html')
url = 'http://devapi.saved.io/bookmarks/'
devkey = '<dev key>'
usrkey = '<user key>'
def parse(w):
r = {}
p1, p2, none = w.split(">")
@austinmarton
austinmarton / recvRawEth.c
Created June 3, 2012 07:55
Receive raw Ethernet frames in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/ip.h>