Skip to content

Instantly share code, notes, and snippets.

View davidphasson's full-sized avatar

David Hasson davidphasson

  • MongoDB
  • San Francisco, CA
View GitHub Profile
<?xml version="1.0"?>
<nswall>
<version>1.6</version>
<lastchange>1253659242</lastchange>
<system>
<username>admin</username>
<password>$1$PzndnKjk$gaW3dSJjbVQHQftwBbwRh.</password>
<general>
<timeservers>pool.ntp.org</timeservers>
<time-update-interval>300</time-update-interval>
@0 anchor "default" all
[ Evaluations: 2873 Packets: 4748 Bytes: 1002207 States: 29 ]
[ Inserted: uid 0 pid 15535 State Creations: 276 ]
@1 block drop in quick from urpf-failed to any
[ Evaluations: 2873 Packets: 351 Bytes: 82795 States: 0 ]
[ Inserted: uid 0 pid 15535 State Creations: 0 ]
@2 pass out quick on vr0 proto udp from any port = bootpc to any port = bootps keep state
[ Evaluations: 2522 Packets: 0 Bytes: 0 States: 0 ]
[ Inserted: uid 0 pid 15535 State Creations: 0 ]
@3 block drop in log quick on vr0 inet proto udp from any port = bootps to 192.168.254.0/24 port = bootpc
<?php
$target = "files/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded ";
$secs = time() - $_SERVER['REQUEST_TIME'];
echo "in a total of $secs seconds.";
}
#!/usr/bin/env python
import os, sys, httplib, base64, pprint
pp = pprint.PrettyPrinter(indent=4)
headers = {
# "x-isi-set-location": sys.argv[2],
}
conn = httplib.HTTPConnection("www.loni.ucla.edu", 80)
#include <stdio.h>
#include <math.h>
void avg_pbr(int a, int b, int *r);
int avg(int b, int a);
int main()
{
int *result;
#!/usr/local/bin/bash
# Declare an array
declare -a locations
# Populate with locations
locations=( four_d enigma hardi adni woods edevel ccb ad altshuler asl collabs fmri shapetls spectrum mouse ois gsrs blackops eluders warp bearden poldrack )
# Set a date string for the snapshot names
date=`date +%y-%m-%d_%H-%M-%S`