Skip to content

Instantly share code, notes, and snippets.

import crafttweaker.data.IData;
import crafttweaker.item.IItemStack;
val goldBlock=<minecraft:gold_block>;
val sideItems = {
efficiency: <minecraft:potion>.withTag({Potion: "minecraft:strong_swiftness"}),
unbreaking: <minecraft:potion>.withTag({Potion: "minecraft:strong_strength"})
} as IItemStack[string];
#0 __memset_avx2 () at ../sysdeps/x86_64/multiarch/memset-avx2.S:135
No locals.
#1 0x00000000007cdd9b in DFInstanceLinux::read_raw (this=0x13797f0, addr=17974274650124877746, bytes=17179869184, buffer=0x7ffff6c593b0) at /build/src/dfinstancelinux.cpp:154
bytes_read = -1
__FUNCTION__ = "read_raw"
#2 0x0000000000556629 in DFInstance::enum_vec<int> (this=0x13797f0, addr=140406800909548) at /build/src/dfinstance.h:110
bytes_read = 4
__FUNCTION__ = "enum_vec"
out = {d = 0x7ffff6c59398}
start = 17974274650124877746
// Source: http://unix.stackexchange.com/a/251769/17594
// Modifications: long long, exit codes, diagnostics
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <sys/ptrace.h>
#include <sys/socket.h>
#include <arpa/inet.h>
@Seanmatthews
Seanmatthews / SLACKTIVE.md
Last active January 11, 2017 16:54
Slack user keepalive
  1. Put slacktive.py somewhere on your system, then change the path in slacktive.plist
  2. Put com.sean.python.slacktive.plist in ~/Library/LaunchAgents/
  3. Add your token to com.sean.python.slacktive.plist (see file comments)
  4. launchctl load ~/Library/LaunchAgents/com.sean.python.slactive.plist
[info]
checksum=0xaf8cc86c
version_name=v0.43.05 linux64
complete=true
[addresses]
cur_year_tick=0x01a77260
current_year=0x01a77280
dwarf_civ_index=0x01a70a08
dwarf_race_index=0x01a70a14
@williewillus
williewillus / primer.md
Last active March 24, 2025 04:52
Capabilities: A Primer (tm)

Capabilities

Another award-winning primer by williewillus

Capabilities...a wondrous new system. That you've probably been forced into using. But let's not talk about that and get straight into the learning!

Terms and definitions

  • Capability System - This entire system; what this primer is about. This system is named very literally for what it does.
    • Capability - the quality of being capable; capacity; ability
  • Capable - having power and ability
@tvon
tvon / init.vim
Created November 2, 2015 18:15
neovim init
" https://github.com/junegunn/vim-plug
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:plug_window = 'botright new | resize 10'
call plug#begin('~/.config/nvim/plugged')
"Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-jdaddy'
Plug 'tpope/vim-repeat'
@sitano
sitano / numa-maps-summary.pl
Last active June 5, 2024 10:21
Show numa maps distribution
#!/usr/bin/perl
# Copyright (c) 2010, Jeremy Cole <[email protected]>
# Modified (c) 2014, Ivan Prisyazhniy <[email protected]>
# - top [num] - mode to print numa map distribution from mem top
# This program is free software; you can redistribute it and/or modify it
# under the terms of either: the GNU General Public License as published
# by the Free Software Foundation; or the Artistic License.
#
@techtonik
techtonik / sha1.py
Last active March 3, 2024 16:06
Calculate SHA-1 of a file in Python
#!/usr/bin/env python
"""
usage: python -m sha1 <filename>
"""
import sys
import hashlib
# --- these fields are required for packaging
__version__ = '1.0'
__author__ = 'anatoly techtonik <[email protected]>'
@ifels
ifels / golang_pipe_http_response.go
Last active February 1, 2023 19:19
golang pipe the http response
package main
import (
"io"
"net/http"
"os/exec"
)
var (
BUF_LEN = 1024