Skip to content

Instantly share code, notes, and snippets.

Pierre Carrier pcarrier

Block or report user

Report or block pcarrier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pcarrier on github.
  • I am pierre ( on keybase.
  • I have a public key whose fingerprint is B0D5 888D C825 E637 640B 58A8 0355 26F2 EBE4 EA5A

To claim this, I am signing this object:

View $profile .ps1
function safe { Set-Variable WhatIfPreference $true -Scope Global };
function unsafe { Set-Variable WhatIfPreference $false -Scope Global -WhatIf:$false };
function isAdmin {
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator);
function shell { Start-Process powershell -WorkingDirectory $PWD -ArgumentList "-NoLogo" };
function admin { Start-Process powershell -ArgumentList "-NoLogo" -Verb RunAs };
View 24.rb
#!/usr/bin/env ruby
OPS = [:+, :-, :*, :/]
ALL_OPS = OPS.product(OPS).product(OPS).map do |n| n.flatten end
ALL_FOUR_CARDS = (0..9999).map do |n|
a = n % 10 + 1
b = n/10 % 10 + 1
c = n/100 % 10 + 1
d = n/1000 % 10 + 1
resource "aws_iam_user" "asg_healthreport" {
name = "${var.stack}-asg_healthreport"
# can't use create_before_destroy due to fixed name
resource "aws_iam_access_key" "asg_healthreport" {
user = "${}"
# can't use create_before_destroy due to fixed name of user
View gist:7b53fd39886aea8d5c77
[remote "stable"]
url =
url = git://
fetch = +refs/heads/*:refs/remotes/stable/*
[remote "mainline"]
url =
url = git://
fetch = +refs/heads/*:refs/remotes/mainline/*
[remote "history"]
url =
pcarrier / 0_reuse_code.js
Created Oct 18, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
pcarrier / Makefile
Last active Aug 29, 2015
callbench: clock timing
View Makefile
callbench: callbench.o parse_vdso.o
musl-gcc -o $@ $? -lrt -static
sstrip $@
%.o: %.c
musl-gcc -c $< -o $@
rm *.o callbench
View gist:2fe0505176b62fbd4add
% cat ~/Library/Preferences/IntelliJIdea14/codestyles/Tweet.xml
<code_scheme name="Tweet">
<option name="LINE_SEPARATOR" value="&#10;" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="1000" />
<value />
<option name="IMPORT_LAYOUT_TABLE">
View Acer C720 crouton
localhost% for f in prepare run cleanup; do sysbench --test=fileio --file-test-mode=rndrw --max-time=60 --max-requests=0 --file-extra-flags=direct $f; done
sysbench 0.4.12: multi-threaded system evaluation benchmark
128 files, 16384Kb each, 2048Mb total
Creating files for the test...
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
You can’t perform that action at this time.