Skip to content

Instantly share code, notes, and snippets.

View Amar1729's full-sized avatar

Amar Paul Amar1729

View GitHub Profile
package main
import "fmt"
import "bufio"
import "sort"
import "os"
import "strings"
import "strconv"
@Amar1729
Amar1729 / _chunkc.zsh
Last active October 17, 2018 03:20
Zsh completions for chunkc
#compdef chunkc
# Note for plugin authors:
# You can make your own zsh completions, and include these by calling `_chunkc'
# in the top-level function of the new completions and defining your subcommand
# with syntax: _chunkc_<plugin>_<subcmd> like so:
# Fake chunkc plugin
#
# function _chunkc_plugin_set { return }
@Amar1729
Amar1729 / README.md
Created October 30, 2018 17:09 — forked from mbbx6spp/README.md
How to install Nix in your home directory

Nix

Prerequisites

  • wget is installed
  • tar is installed

Purpose

If you really don't want to install Nix under /nix (or you can't) then you can install Nix

@Amar1729
Amar1729 / arch-linux-install.sh
Last active June 15, 2020 23:45 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# boot loaders (helpful when dual-booting): https://wiki.archlinux.org/index.php/Arch_boot_process#Boot_loader
# - GRUB and rEFInd are quite popular
# General recommendations (after install): https://wiki.archlinux.org/index.php/General_recommendations
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
@Amar1729
Amar1729 / interception.jelly
Created January 27, 2019 02:35
FB-2018-hackercup 1: python and jelly solution
Ɠ‘©
ɠø¢¡ø®’Ḃ
“`ȥ)øỊm»ø“6I»ø¢ø?
“ŒXɗ?»;⁸;“M»;¢
ƓRÇ€Y
@Amar1729
Amar1729 / upload.sh
Created February 23, 2019 00:29
Batch upload icon links as emojis to RocketChat.
#!/usr/bin/env bash
# Author: Amar Paul
# Add custom emojis to a rocketchat server.
# Usage:
# Expects a yaml/ dir with .yaml files, formatted as such:
# - name: <name_of_emoji>
# src: <src_url>
#
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
index 236b996..b881059 100644
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -1502,6 +1502,8 @@ EXTRA_libgnu_la_SOURCES += open.c
## end gnulib module open
+libgnu_la_SOURCES += open_memstream.c
+
diff --git a/configure b/configure
index 84dce93..3de6e1f 100755
--- a/configure
+++ b/configure
@@ -59469,10 +59469,17 @@ fi
ac_fn_c_check_header_mongrel "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default"
if test "x$ac_cv_header_rpc_xdr_h" = xyes; then :
+else
+
@Amar1729
Amar1729 / _tmux-a.zsh
Last active December 19, 2022 02:38
_tmux-a.zsh completions
#compdef _tmux-a tmux-a
# Complete attached-sessions and detached-sessions as separate tags.
# function __tmux-sessions-separately {
function _tmux-a {
local ret=1
local -a sessions detached_sessions attached_sessions
sessions=( ${${(f)"$(command tmux 2> /dev/null list-sessions)"}/:[ $'\t']##/:} )
detached_sessions=( ${sessions:#*"(attached)"} )
attached_sessions=( ${(M)sessions:#*"(attached)"} )
@Amar1729
Amar1729 / enokey.patch
Last active December 19, 2022 02:38
PATCH: enokey (hivexsh)
diff --git a/sh/hivexsh.c b/sh/hivexsh.c
index b925ddb..8676291 100644
--- a/sh/hivexsh.c
+++ b/sh/hivexsh.c
@@ -27,6 +27,9 @@
#include <unistd.h>
#include <assert.h>
#include <errno.h>
+
+#define ENOKEY 126