View alert.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("Gist XSS"); |
View part2.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aim=0 | |
depth=0 | |
forward=0 | |
File.readlines('input.txt').each do |line| | |
if /([^ ]*) ([0-9]*)/ =~ line | |
puts "direction: " + $1 + " value " + $2 + "\n" | |
value = $2.to_i | |
movement = $1 | |
if movement == "forward" | |
forward = forward + value |
View part1.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
depth=0 | |
forward=0 | |
File.readlines('input.txt').each do |line| | |
if /([^ ]*) ([0-9]*)/ =~ line | |
puts "direction: " + $1 + " value " + $2 + "\n" | |
value = $2.to_i | |
movement = $1 | |
if movement == "forward" | |
forward = forward + value | |
else |
View day1_part2.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = 0 | |
previous = 999999999999999 | |
current = 0 | |
block1=0 | |
block2=0 | |
block3=0 | |
pos=0 | |
File.readlines('input').each do |line| | |
num = line.to_i |
View gist:d11e71184fed5db468eb68fc89afed39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch upstream | |
git checkout master | |
git reset --hard upstream/master | |
git push origin master --force |
View gist:62058a30ef2d6b1641ff9c809e7899cf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "Hello" | |
20 GOTO 10 |
View dvwa_db_connection_test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Put this file in the root of the DVWA installation then access it through a browser. | |
*/ | |
require_once "config/config.inc.php"; | |
function var_dump_pre ($data) { | |
print "<pre>"; | |
var_dump ($data); |
View macro.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
$message = ""; | |
if ($_SERVER['REQUEST_METHOD'] == "POST") { | |
if (array_key_exists ("token", $_POST) && array_key_exists ("token", $_SESSION)) { | |
if (array_key_exists ("token", $_SESSION)) { | |
if ($_POST['token'] == $_SESSION['token']) { | |
$message = "Success"; |
View gist:d68f3c272778ec9a3299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "redis" | |
require "concurrent" | |
redis = Redis.new | |
redis.flushdb | |
pool = Concurrent::FixedThreadPool.new( | |
Concurrent.processor_count, |
View gist:e5e16b285232ebf0c1df
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "redis" | |
redis = Redis.new | |
redis.flushdb | |
redis.zincrby("colours", 1, "red") | |
redis.sadd("colours:base:red", "thread") | |
redis.zincrby("colours", 1, "red") | |
redis.sadd("colours:base:red", "red box") | |
redis.zincrby("colours", 1, "green") |
NewerOlder