Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.19;
/**
* @title NonFungibleTokenLib
* @author Ghilia Weldesselasie
* SHAMELESS SELF-PLUG: https://github.com/ERC-ME/Whitepaper
*
* version 1.2.1
* Copyright (c) 2018 Ghilia Weldesselasie
* The MIT License (MIT)
@GNSPS
GNSPS / ProxyFactory.sol
Last active December 11, 2024 21:58
Improved `delegatecall` proxy contract factory (Solidity) [v0.0.5]
/***
* Shoutouts:
*
* Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/
* Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/
* Credits to Jorge Izquierdo (@izqui) for coming up with this design here: https://gist.github.com/izqui/7f904443e6d19c1ab52ec7f5ad46b3a8
* Credits to Stefan George (@Georgi87) for inspiration for many of the improvements from Gnosis Safe: https://github.com/gnosis/gnosis-safe-contracts
*
* This version has many improvements over the original @izqui's library like using REVERT instead of THROWing on failed calls.
* It also implements the awesome design pattern for initializing code as seen in Gnosis Safe Factory: https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/ProxyFactory.sol
#+BEGIN_SRC emacs-lisp :results output silent :exports none
(setq
org-latex-minted-options '(("breaklines" "true"))
org-latex-listings 'minted
org-latex-packages-alist '(("" "minted" "parskip" "hypersetup"))
org-latex-to-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")
org-latex-pdf-process org-latex-to-pdf-process)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@b333z
b333z / vsls
Last active July 20, 2021 22:55
vccode live share nixos
#!/usr/bin/env bash
# TODO: Look at nixpkgs/pkgs/build-support/setup-hooks/auto-patchelf.sh
# https://ms-vsliveshare.gallery.vsassets.io/_apis/public/gallery/publisher/MS-vsliveshare/extension/vsliveshare/0.3.423/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
set -eu
TOOLS="patchelf xsel"
DEPS="utillinux.out openssl.out icu zlib curl.out lttng-ust libsecret libkrb5"
@181192
181192 / increase_root_fedora.md
Last active April 12, 2025 21:13
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@ottidmes
ottidmes / default.nix
Last active May 23, 2021 18:41
VS Code Live Share extension
# Baseed on previous attempts of others: https://github.com/NixOS/nixpkgs/issues/41189
{ lib, vscode-utils, autoPatchelfHook, bash, file, makeWrapper, dotnet-sdk
, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, utillinux, zlib
, enableDiagnosticsWorkaround ? false, gccStdenv
}:
with lib;
let
# https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually
@ilevantis
ilevantis / bedtools_cheatsheet.md
Last active April 16, 2025 22:26
Bedtools cheatsheet

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.
@floscr
floscr / sorting-lines-by-regexp.org
Created May 29, 2019 16:05
Sorting Lines by Regexp

Sorting Lines by regexp

Say you have the code, andd you want to sort by the key

(map! :leader (:desc "Notes" :prefix "n"
                :desc "Pinboard File"        :n "B" (λ! (find-file org-pinboard-file))
                :desc "Reading List"         :n "r" #'+org|org-open-reading-list-file
                :desc "Home"                 :n "h" #'+org|org-open-home-file