Skip to content

Instantly share code, notes, and snippets.

@mrmx
mrmx / wallet-balance.sh
Created September 11, 2016 11:25
Get balance of rusty bitcoin wallet.dat for all addrs in bash
#!/bin/bash
#
# Depends on:
# pywallet.py from https://github.com/pagobit/pywallet
# jq from https://stedolan.github.io/jq
for addr in $(./pywallet.py --dumpwallet | jq --raw-output ".keys[].addr"); do
echo "$addr balance:";
curl https://insight.bitpay.com/api/addr/$addr/balance;
echo "";
@vScripter
vScripter / Start-PowerCLI.ps1
Last active March 22, 2017 15:09
PowerCLI 'loader' function
function Start-PowerCLI {
<#
.NOTES
Loads PowerCLI, depending on what version you have installed. Set the default -Version parameter, depending in your environment.
#>
[cmdletbinding()]
param (
[parameter(Mandatory = $false, Position = 0)]
@onesail
onesail / load-xml-src.js
Created June 3, 2016 23:01
add support for src attribute in strapdown.js
<!-- usage -->
<!-- <xmp src="homepage.md" theme="cerulean" style="display:none;"></xmp> -->
<!-- <script src="load-xmp-src.js"></script> -->
var elements = document.body.getElementsByTagName("*");
for(var i=0; i<elements.length; i++) {
var element = elements[i];
if(element.nodeName == "XMP") {
var xhr = new XMLHttpRequest();
xhr.open('GET', element.getAttribute("src"), false);
@PSJoshi
PSJoshi / fprobe-nfsen-install.txt
Last active June 29, 2022 05:54
nfsen-with-plugins installation
Installing fprobe/nfdump/nfsen with plugins like PortTracker:
-------------------------------------------------------------
1) Make sure that SELinux is disabled.
vi /etc/selinux/config
set SELINUX=disabled
2) Start and enable httpd at boot
# service httpd start
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@rumpelsepp
rumpelsepp / install-pacaur.sh
Last active November 20, 2022 13:04
A small script for arch linux which builds and installs "pacaur" automatically
#!/usr/bin/bash -l
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2017 Stefan Tatschner
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@developius
developius / README.md
Last active April 25, 2024 22:15
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@mandiwise
mandiwise / Update remote repo
Last active April 17, 2024 07:41
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@alexlovelltroy
alexlovelltroy / reassign.sh
Created December 18, 2014 20:33
reallocate unassigned shards in elasticsearch
NODE="a hostname"
IFS=$'\n'
for line in $(curl -s 'localhost:9200/_cat/shards' | fgrep UNASSIGNED); do
INDEX=$(echo $line | (awk '{print $1}'))
SHARD=$(echo $line | (awk '{print $2}'))
curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -d '{
"commands": [
{
"allocate": {