Skip to content

Instantly share code, notes, and snippets.

sub init()
' Setup the Activation Screen
m.activation = createObject("roSGNode", "ActivationView")
m.activation.ObserveField("activationSuccess", "MainScene_OnActivationSuccess")
' Setup the main Grid
m.grid = CreateObject("roSGNode", "GridView")
m.grid.SetFields({
style: "standard"
posterShape: "16x9"
@febbraro
febbraro / httpdiff
Created September 22, 2017 23:07
SSL/TLS errors on phish.in
>> httpdiff --method HEAD https://s3.amazonaws.com/phase2.public/audio/32020.mp3 https://phish.in/audio/000/032/020/32020.mp3
Doing HEAD:
https://s3.amazonaws.com/phase2.public/audio/32020.mp3
https://phish.in/audio/000/032/020/32020.mp3
Error doing HEAD https://phish.in/audio/000/032/020/32020.mp3: x509: certificate signed by unknown authority
@febbraro
febbraro / -
Created September 14, 2016 18:52
https://gist.github.com/690800e4e5d24cdb95440be8cf168548
@febbraro
febbraro / -
Created September 14, 2016 18:51
// Setup the linting
function lintJson() {
return gulp.src('*.theme.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter());
}
// Add a validate task that will fail on lint error
gulp.task('validate:json', 'Test JSON', function() {
return lintJson().pipe(jsonlint.failAfterError());
@febbraro
febbraro / -
Created September 14, 2016 18:42
function lintJson() {
return gulp.src('*.theme.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter());
}
gulp.task('validate:json', 'Test JSON', function() {
return lintJson().pipe(jsonlint.failAfterError());
});
tasks.validate.push('validate:json');
~/Projects/phase2-aws/packer   master ●  packer build ami-build.json
east-ami output will be in this color.
==> east-ami: Prevalidating AMI Name...
==> east-ami: Inspecting the source AMI...
==> east-ami: Creating temporary keypair: packer 57a37e8a-1e93-f36a-7b65-b3fbecb1a987
==> east-ami: Launching a source AWS instance...
east-ami: Instance ID: i-0c22099c
==> east-ami: Waiting for instance (i-0c22099c) to become ready...
==> east-ami: Waiting for SSH to become available...
✘  ~/Projects/phase2-aws/packer   master ●  packer build ami-build.json
east-ami output will be in this color.
==> east-ami: Prevalidating AMI Name...
==> east-ami: Inspecting the source AMI...
==> east-ami: Creating temporary keypair: packer 57a289b7-8f72-eaff-848d-de9e0450259f
==> east-ami: Launching a source AWS instance...
east-ami: Instance ID: i-14391784
==> east-ami: Waiting for instance (i-14391784) to become ready...
==> east-ami: Waiting for SSH to become available...
@febbraro
febbraro / Dockerfile
Created August 13, 2015 19:31
servicebase
FROM centos:centos7
# Install our yum wrapper.
ADD root /
# Install base packages.
RUN yum -y install epel-release && \
yum -y update && \
yum -y install sudo ssh curl less vim-minimal dnsutils
@febbraro
febbraro / gist:8672744
Last active January 4, 2016 20:19
Resize a coreos partition
1) cp /usr/lib/coreos/resize_state ~/fusion_resize_state
2) Remove the check "if sgdisk -v "$DISK_DEVNAME" | grep -q "^Problem: The secondary header"; then"
3) sudo -s
4) ./fusion_resize_state /dev/disk/by-label/STATE
5) Restart
6) ./fusion_resize_state /dev/disk/by-label/STATE
7) resize2fs /dev/sda9
...
???
...
@febbraro
febbraro / gist:3759185
Created September 21, 2012 00:55
Scala Example Exercise
package example
import common._
import java.util.NoSuchElementException
object Lists {
/**
* This method computes the sum of all elements in the list xs. There are
* multiple techniques that can be used for implementing this method, and
* you will learn during the class.