Skip to content

Instantly share code, notes, and snippets.

View nimbosa's full-sized avatar

nimbosa nimbosa

View GitHub Profile
I would prefer the solutions in this order: 3 2 1
@robinsmidsrod
robinsmidsrod / firefly.ipxe
Created June 14, 2013 13:02
Firefly IllumOS recovery environment netbooted using iPXE
#!ipxe
echo Booting Firefly 0613 for ${initiator-iqn}
set base-url ${boot-url}/firefly-0613/boot
# http://alexeremin.blogspot.no/2013/05/firefly-failsafe-image-for-illumos.html
# http://sourceforge.net/projects/fireflyfailsafe/files/
# Download ISO, unpack ISO and copy files to boot-url
# The ramdisk is compressed with gzip, which must be unpacked
# to work with iPXE
# mv firefly firefly.gz
# gunzip firefly.gz
@AgoristRadio
AgoristRadio / gist:5803075
Last active January 2, 2023 08:54
Bitcoin Dev Luke Jr: Mixing Bitcoins is Money Laundering, and it's Illegal, also Tax Evasion is a Sin. Use of Bitcoin Nor Free Speech is a Right.
<BenderCoin> I was wondering if anyone knew if 'change' addresses are reused to receive change? or are new change addresses\
created when they are needed. I could not find anything on this with some searching.
<BenderCoin> The reason this is important is if someone uses a wallet to send btc to a mix service, then sends it back to t\
he same wallet, then spends it, if the new spend can use an old change address, then the mix service 'clean coins' have now\
been linked with this old change address.
<gmaxwell> BenderCoin: they are not reused.
<Mylon> Someone with more knowledge of the code will need to confirm / elaborate on this, but from what I understood, is th\
at they by default always generate new addresses
<Mylon> Though ofc this is wallet specific
<BenderCoin> gmaxwell, so your response was in regards to bitcoin-qt then.
@apisurfer
apisurfer / bf.php
Created June 25, 2013 15:06
Simple brute force or string matching in PHP
<?php
/**
This is a simple proof of concept of a brute force algorithm for string matching with
given set of characters.
The way this works is that the algorithm counts from first to last possible combination of
given characters. Instead of counting(incrementing) in number base 10 we use
a new base which is derived from your set of possible characters (we count in symbols).
So if your characters list contains 27 characters the program actually counts in a 27 base
number system.
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<!--
Author: Rod Page
Source: http://iphylo.blogspot.com/2011/07/correcting-ocr-using-hocr-firefox.html#comment-400434491
-->
<xsl:output method='html' version='1.0' encoding='utf-8' indent='yes'/>
<xsl:variable name="scale" select="800 div //page/@width" />
@mkropat
mkropat / knownpaths.py
Last active February 4, 2025 17:31
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
@ralph-tice
ralph-tice / i2.2xlarge #1
Last active January 2, 2016 16:19
unixbench i2.2xlarge bonnie++ output
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: machine1.com: GNU/Linux
OS: GNU/Linux -- 3.8.0-35-generic -- #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (5000.1 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (5000.1 bogomips)

The current schedule for the completion of ECMAScript 6, the next version of JavaScript, dictates that the language specification be finished by the end of the second quarter of 2014. Most browser vendors have made informal commitments to have ES6 implemented by the end of the year. Over the last couple years, we've heard a lot about the many new features in ES6, along with the debate (and bickering) which has gone into its design. ES6 stands to be the most substantial change to JavaScript since ES4 (which didn't work out that great, as most users of ES5 are aware).

With this much change comes a lot of complexity. Many of the new features (like generators or proxies) are powerful, basic abstractions, and as such combine in complex (and potentially unexpected) ways. In many ways, a new version of JavaScript offers the possibility of returning us to the wild frontier days that JavaScript only recently left behind, with library and framework vendors each choosing their own combinations of features to build powe

export BOXNAME=smartos01
export ISO=https://download.joyent.com/pub/iso/latest.iso
# Download iso
wget $ISO
# Create VM
VBoxManage createvm --name $BOXNAME --ostype OpenSolaris_64 --register
VBoxManage modifyvm $BOXNAME --memory 1024 --hwvirtex on --hwvirtexexcl off --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd --boot2 disk --acpi on

If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.

Running SmartOS under vmware Fusion

  1. Start by downloading the latest live image
  2. When you run the new VM wizard, select "Continue without disk" on the first screen of the wizard.
  3. Select Sun Solaris / Solaris 10 64-bit on the next screen.
  4. You're going to get dumped to a config screen when the live image starts up, choose DHCP for the networking and defaults for everything else.
  5. Pretty much the first thing you're going to want to do is figure out how to SSH into the box once it boots and creates its storage pools, because trying to do stuff in the virtual console is miserable. There's no cut and paste