Skip to content

Instantly share code, notes, and snippets.

icio is typing...

Paul Scott icio

icio is typing...
View GitHub Profile
View gist:802351
function bad (foo) {
if ( ! (foo instanceof Bar) ) {
throw new TypeError("This is an annoying restriction!");
return foo.baz(foo.quux(10));
function good (foo) {
if ( !foo.baz || !foo.quux ) {
throw new TypeError("We need foo to have baz and quux methods.");
icio / gist:826934
Created Feb 15, 2011
View gist:826934
- Example usage of Raphael.el.wave
- Produces:
var paper;
View gist:834328
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.ui.Keyboard;
public class Main extends Sprite
icio / gist:848120
Created Feb 28, 2011
Newton-Raphson in R
View gist:848120
#| Using the Newton-Raphson Method, find the root of
#| the function f (with derivative fdx) near the
#| point x (with tolerance e [solution x has abs f(x) < e]
#| and within a limit of 1000 steps)
newtonRaphson <- function(x, f, fdx, e = 0.001, maxSteps = 1000)
step = 0;
while (abs(x) > e && step < maxSteps)
icio / manifest.json
Created Mar 17, 2011
Chrome extension to list all tab locations and copy them to the clipboard
View manifest.json
"name": "Open URL Collector",
"version": "1.0",
"description": "Creates a list of the URLs of open tabs.",
"browser_action": {
"default_icon": "famfamfam_silk_cut_tab.png",
"popup": "popup.html"
"permissions": ["tabs"]
icio / get_prime.php
Created Mar 22, 2011
N-th Prime Numbers
View get_prime.php
* A method for finding n-th prime numbers. Usage example follows at the end.
* @author Paul Scott <>
* Calculate the n-th prime number(s).
View gist:901431
<div class='blockHeader' style='padding-bottom:5px;border-bottom:1px solid #cbcbcb !important;border-top:1px solid #c8c8c8 !important;font-weight:bold;height:24px; vertical-align:top;top:-23px;position:relative; padding-left: 33px;color:#2c3434 !important;padding-top:13px;'>
<font style=' background: -webkit-gradient(linear, 0% 25%, 0% 80%, from(#707070), to(#050505) );-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:14px;'>
Would you help company
View cli-router.php
#! /usr/bin/env php
* =======================================================
* Route the user input to the correct function.
icio /
Created Sep 24, 2011
Split (by line) a file into similarly-sized parts each less than a given size
#!/usr/bin/env bash
# Filesize limit (MiB)
limit=$(($1 * 1000**2))
# Accept multiple files in the arguments
for file in $@
# Skip arguments that aren't regular files
icio / gist:1253244
Created Sep 30, 2011
Kevin Mitnick Voice Mail and Fax Exploit
View gist:1253244
8.2 Voice Mail and Fax Exploit
This exploit relies on convincing an employee at a large company to enable a voice mailbox: the intruder would call the people who administer the voice mailboxes for the target company and request a mailbox. The pretext would be that the intruder works for a different division, and would like to retrieve messages without making a toll call.
Once the intruder has access to the voice mail system, the intruder would call the receptionist, represent himself as an employee of the company, and ask that they take messages for him; last but not least, the intruder would request the fax number and ask that incoming faxes be held for pickup. This sets the stage for the call to the target division of the company.
At this point, the intruder would call the target division to initiate the fax exploit with the goal of obtaining the targeted confidential company information. During that call the intruder would identify himself as an employee of th
You can’t perform that action at this time.