One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
//returns an assoc array with bitRate (kbps) and sampleRate (hz) | |
function getMP3BitRateSampleRate($filename) | |
{ | |
if (!file_exists($filename)) { | |
return false; | |
} | |
$bitRates = array( | |
array(0,0,0,0,0), | |
array(32,32,32,32,8), |
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
<?php | |
try { | |
$sxe = simplexml_load_string($xmlstring, 'SimpleXMLIterator'); | |
for ($sxe->rewind(); $sxe->valid(); $sxe->next()) { | |
if ($sxe->hasChildren()) { | |
foreach ($sxe->getChildren() as $element=>$value) { | |
echo $value->species . '<br />'; | |
} | |
} | |
} |
On mac:
/usr/local/bin
.// ==UserScript== | |
// @name Steam Queue Auto Discoverer | |
// @description Discover the Steam queue three times to get the sale cards | |
// @version 2.3.0 | |
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7 | |
// @icon https://store.steampowered.com/favicon.ico | |
// @match https://store.steampowered.com/explore* | |
// @grant none | |
// ==/UserScript== |
This fast tutorial will teach you how to install redis-cli
on AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli
# -*- coding: utf-8 -*- | |
# | |
# Author: Vegard Nossum <[email protected]> | |
import math | |
import os | |
import sys | |
import cairo |
I have a Linux virtual machine inside a customer's private network. For security, this VM is reachable only via VPN + Citrix + Windows + a Windows SSH client (eg PuTTY). I am tasked to ensure this Citrix design is secure, and users can not access their Linux VM's or other resources on the internal private network in any way outside of using Citrix.
The VM can access the internet. This task should be easy. The VM's internet gateway allows it to connect anywhere on the internet to TCP ports 80, 443, and 8090 only. Connecting to an internet bastion box on one of these ports works and I can send and receive clear text data using netcat. I plan to use good old SSH, listening on tcp/8090 on the bastion, with a reverse port forward configured to expose sshd on the VM to the public, to show their Citrix gateway can be circumvented.
I hit an immediate snag. The moment I try to establish an SSH or SSL connection over o