Skip to content

Instantly share code, notes, and snippets.

@maciej-izak
maciej-izak / pipeaccept.js
Created August 7, 2016 20:07 — forked from heapwolf/pipeaccept.js
accepting input from a pipe, nodejs
var data;
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
data += chunk;
});
process.stdin.on('end', function() {
@maciej-izak
maciej-izak / E01.pas
Last active December 8, 2016 10:30
FPC black list
program E01;
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
{$APPTYPE CONSOLE}
type
TA = class
constructor Create(A: Integer = 0); overload; virtual;
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <pthread.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@maciej-izak
maciej-izak / timecmd.bat
Created June 30, 2017 20:28
Execution time of program by bat script
@echo off
@setlocal
set start=%time%
:: runs your command
cmd /c %*
set end=%time%
set options="tokens=1-4 delims=:.,"
@maciej-izak
maciej-izak / build_openssl_dylib.sh
Last active January 20, 2018 19:31 — forked from tmiz/build_openssl_dylib.sh
Build latest OpenSSL Universal Binary on OSX
#!/bin/bash
OPENSSL_VERSION="1.0.0s"
curl -O -L http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_i386
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
mv openssl-$OPENSSL_VERSION openssl_x86_64
cd openssl_i386
http://jvns.ca/debugging-zine.pdf
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
http://www.brendangregg.com/linuxperf.html
http://www.brendangregg.com/Perf/linux_perf_tools_full.png
https://www.devopszen.com/network-monitoring-tools
***AWESOME***
@maciej-izak
maciej-izak / update_curl.sh
Last active November 27, 2018 18:11 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.62.0.tar.bz2
tar -xvjf curl-7.62.0.tar.bz2
@maciej-izak
maciej-izak / Delphi-version-info.md
Created March 13, 2019 21:27 — forked from jpluimers/Delphi-version-info.md
Delphi version info table; need help with these" ProjectVersion for C# Builder, Delphi 2005 and 2006. DllSuffix for C# Builder. ProductSummaries

Parsing argument "ProductSummaries":

Product Summaries:

BDS # HKCU/HKLM registry path Name CompilerVersion RTLVersion Define Characterset Frameworks Version DllSuffix ProjectVersion Architectures ReleaseDate BetaName HKCU HKLM
\Software\Borland\Delphi\5.0 Borland Delphi 5 N/A N/A VER130 Ansi VCL 5 ?
@maciej-izak
maciej-izak / aarch64qemu.md
Created October 2, 2016 13:45 — forked from ecliptik/aarch64qemu.md
Ubuntu 14.04 arm64 Port QEMU Configuration

Setting up a Ubuntu 14.04 or Debian 8 (jessie) arm64 VM

This is mainly a notes dump and should be used for reference. This guide assumes:

  • Ubuntu 14.04 (or Debian 8) hypervisor/host with bridge networking
  • Knowledge of qemu
  • Knowledge of debootstrap

Limitations of the qemu-system-aarch64 emulator on x86 include only being able to emulate one CPU and no KVM support.

@maciej-izak
maciej-izak / FindExecutable.fs
Created June 9, 2020 11:50 — forked from drvink/FindExecutable.fs
F# inline MSBuild tasks via FSharp.Compiler.CodeDom
namespace Example
open System
open System.IO
open System.Runtime.InteropServices
open System.Text
open Microsoft.Build.Framework
open Microsoft.Build.Utilities
module internal Externs =