Skip to content

Instantly share code, notes, and snippets.

@kevinjqiu
kevinjqiu / index.php
Created September 10, 2012 18:11
level1
<html>
<head>
<title>Guessing Game</title>
</head>
<body>
<h1>Welcome to the Guessing Game!</h1>
<p>
Guess the secret combination below, and if you get it right,
you'll get the password to the next level!
</p>
#! /bin/bash
current_branch=$(git symbolic-ref -q HEAD | cut -d'/' -f3)
files_changed=$(git diff --name-only $current_branch master | grep -e "\.py$")
if [ -e "$files_changed" ]; then
echo "No python code was changed. Exiting..."
exit 0
else
for file in $files_changed; do
<?php
session_start();
if ($_FILES["dispic"]["error"] > 0) {
echo "<p>Error: " . $_FILES["dispic"]["error"] . "</p>";
}
else
{
$dest_dir = "uploads/";
$dest = $dest_dir . basename($_FILES["dispic"]["name"]);
#!/usr/bin/env python
#
# Welcome to the Secret Safe!
#
# - users/users.db stores authentication info with the schema:
#
# CREATE TABLE users (
# id VARCHAR(255) PRIMARY KEY AUTOINCREMENT,
# username VARCHAR(255),
# password_hash VARCHAR(255),
<html>
<body>
<p>
Welcome to the Secret Safe, a place to guard your most
precious secrets! To retreive your secrets, log in below.
</p>
<p>The current users of the system store the following secrets:</p>
<ul>
@kevinjqiu
kevinjqiu / evolve.ini.diff
Created October 26, 2012 21:12
evolve.ini.diff
:100644 100644 0ce1cc5... 4f4de93... M evolve.ini
diff --git a/evolve.ini b/evolve.ini
index 0ce1cc5..4f4de93 100644
--- a/evolve.ini
+++ b/evolve.ini
@@ -91,7 +91,7 @@ delivery_mode = 2
# Logging configuration
[loggers]
@kevinjqiu
kevinjqiu / newrelic-evolve.ini
Created October 26, 2012 21:15
newrelic-evolve.ini
# ---------------------------------------------------------------------------
#
# This file configures the New Relic Python Agent.
#
# The path to the configuration file should be supplied to the function
# newrelic.agent.initialize() when the agent is being initialized.
#
# The configuration file follows a structure similar to what you would
# find for Microsoft Windows INI files. For further information on the
@kevinjqiu
kevinjqiu / newrelic-evolve.ini.diff
Created October 26, 2012 21:17
newrelic-evolve.ini.diff
:100644 100644 14b1174... ca189d5... M newrelic-evolve.ini
diff --git a/newrelic-evolve.ini b/newrelic-evolve.ini
index 14b1174..ca189d5 100644
--- a/newrelic-evolve.ini
+++ b/newrelic-evolve.ini
@@ -56,7 +56,7 @@ monitor_mode = true
# output to standard error output. This would normally result in
# output appearing in your web server log.
# XXX FIX ME
>>> def foo():
... def bar():
... pass
... return bar
...
>>> foo()
<function bar at 0x7f648fe7d758>
>>> foo()
<function bar at 0x7f648fe7d7d0>
>>> foo()
import time
def test0():
assert False
def test1():
time.sleep(1)
assert True