Skip to content

Instantly share code, notes, and snippets.

View rafal2228's full-sized avatar

Rafał Majchrzak rafal2228

View GitHub Profile
@rafal2228
rafal2228 / erc20.ts
Created August 26, 2022 10:31
ERC-20 contract ABI
export default [
{
inputs: [
{
internalType: 'string',
name: 'name_',
type: 'string',
},
{
internalType: 'string',
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "alt+1",
"command": "workbench.action.openEditorAtIndex1",
"when": "!terminalFocus"
},
{
"key": "alt+2",
"command": "workbench.action.openEditorAtIndex2",
@rafal2228
rafal2228 / LICENSE.txt
Created February 27, 2018 16:16 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@rafal2228
rafal2228 / HOST_IP
Last active January 20, 2018 22:40
Get docker0 IPv4 as $HOST_IP
#LINUX VERSION
# Exposing first interface returned by hostname
IFS=' ' read -ra TMP_HOST_IP <<< $(hostname -I)
export HOST_IP=$TMP_HOST_IP
unset TMP_HOST_IP
#exposing docker0
export HOST_IP=`ip -4 addr show scope global dev docker0 | grep inet | awk '{print \$2}' | cut -d / -f 1`
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "alt+1",
"command": "workbench.action.openEditorAtIndex1",
"when": "!terminalFocus"
},
{
"key": "alt+2",
"command": "workbench.action.openEditorAtIndex2",
const original = Observable.prototype.subscribe;
Observable.prototype.subscribe = function (...args) {
const self = this;
if (args.length === 1) {
// tslint:disable-next-line:no-console
return original.call(self, args[0], () => console.trace('test'));
}
return original.apply(self, args);
};
@rafal2228
rafal2228 / ubuntu-wifipass.sh
Last active March 1, 2017 22:57
Ubuntu wifi password
# This goes into your `~/.bashrc` file
alias wifipass-all="sudo grep -r '^psk=' /etc/NetworkManager/system-connections/ | sed 's@/etc/NetworkManager/system-connections/@ @g' | sed 's@:psk=@ - @g'"
alias wifipass="wifipass-all | grep `iwgetid -r`"
# Usage:
# $ wifipass-all -- displays list of all known wifi networks and passwords
# $ wifipass -- displays current wifi network name and password
@rafal2228
rafal2228 / rename.sh
Created January 17, 2016 22:33
Rename multiple files with incrementation
#!/bin/bash
var=1
for file in *.jpg;
do
mv $file "Name_here_"$var".jpg"
var=$((var+1))
done