Skip to content

Instantly share code, notes, and snippets.

$ binwalk as-installer-7.0.1931-full.exe
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 Microsoft executable, portable (PE)
1311671 0x1403B7 XML document, version: "1.0"
1328640 0x144600 Microsoft Cabinet archive data, 1184073 bytes, 44 files
2512849 0x2657D1 Certificate in DER format (x509 v3), header length: 4, sequence length: 1006
2513859 0x265BC3 Certificate in DER format (x509 v3), header length: 4, sequence length: 1187
2515050 0x26606A Certificate in DER format (x509 v3), header length: 4, sequence length: 1221
{ stdenv,
lib,
fetchFromGitHub,
rustPlatform,
cmake,
makeWrapper,
ncurses,
expat,
pkgconfig,
freetype,
@yorickvP
yorickvP / wl-clipboard.el
Created March 14, 2019 11:02
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
withPostgreSQL = drv: pkgs.haskell.lib.overrideCabal drv (a: {
testToolDepends = (a.testToolDepends or []) ++
[ pkgs.ephemeralpg pkgs.postgresql pkgs.getopt ];
preCheck = (a.preCheck or "") + ''
export TEST_PG_CONN_STRING=$(pg_tmp -w 600)
'';
# we need the temporary directory from pg_tmp
# so extract it out of $TEST_PG_CONN_STRING
postCheck = (a.postCheck or "") + ''
pg_tmp stop -d $(echo ''${TEST_PG_CONN_STRING#*=} | sed 's:%2F:/:g')
// from https://sleep-cloud.appspot.com/fetchRecords
var sleeps = require('./sleeps.json').sleeps
const todate = n => {
const d = new Date(n)
return `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
}
//var earliest = todate(sleeps[sleeps.length - 1].toTime)
//console.log(earliest)
const all = {}
sleeps.forEach(({fromTime, toTime}) => {
@yorickvP
yorickvP / build-portable-image.nix
Last active October 21, 2020 09:04
build-portabled-image
{ pkgs ? import <nixpkgs> {}, runCommandNoCC ? pkgs.runCommandNoCC }:
{
name,
config,
extraMountDirs ? [],
extraMountFiles ? []
}:
let
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
{ config, lib, pkgs, ... }@mod:
let
inherit (lib) types mkOption;
module = with types; { name, config, ... }: { options = {
path = mkOption { default = ../profiles/cd + "/${config.src}.nix"; type = path;};
port = mkOption { type = int; };
};};
modules = with lib; (lib.mapAttrsToList (name: cfg: (let file = toString cfg.path; key = file; in
unifyModuleSyntax file key (applyIfFunction key (import cfg.path cfg) mod))) config.cd);
in
[yorick@jarvis:~/serokell/nixpkgs]$ nix-build . -A arcanist
checking outputs of '/nix/store/pwvgg1dzmxpdd7hxl97zg5h9kdblrygv-arcanist-20170323.drv'...
unpacking sources
patching sources
configuring
no configure script, doing nothing
building
total 2124
drwxr-xr-x 1 nixbld1 nixbld 306 Sep 17 23:19 .
drwxr-xr-x 1 nixbld1 nixbld 50 Sep 17 23:19 ..
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.6G 4.0K 1.6G 1% /dev
tmpfs 16G 8.0K 16G 1% /dev/shm
tmpfs 7.9G 5.4M 7.9G 1% /run
tmpfs 16G 384K 16G 1% /run/wrappers
/dev/disk/by-label/nixos 217G 174G 32G 85% /
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 3.2G 28K 3.2G 1% /run/user/1004
tmpfs 3.2G 0 3.2G 0% /run/user/1007
tmpfs 3.2G 16K 3.2G 1% /run/user/1008
let
a = {
b = 10;
};
inherit (a) b;
c = 3;
in b