Skip to content

Instantly share code, notes, and snippets.

View pxlpnk's full-sized avatar
💭
👋 hey

Andreas Tiefenthaler pxlpnk

💭
👋 hey
View GitHub Profile
./ruby
FATAL ERROR: unable to find Rubinius runtime directories.
Rubinius was configured to find the directories relative to:
/rubinius-2.5.2
Set the environment variable RBX_PREFIX_PATH to the directory
that is the prefix of the following runtime directories:
@pxlpnk
pxlpnk / ssh-switch
Created February 18, 2015 20:43
ssh-switch
#!/bin/bash
echo $1
ssh-add -D
ssh-add ~/.ssh/$1
I think you mean team...
I think you mean squad..
I think you mean gang...
I think you mean pals...
I think you mean buds...
I think you mean posse...
I think you mean phalanx...
I think you mean crew...
I think you mean crüe...
I think you mean nerds...
var Alpine = require('alpine');
var alpine = new Alpine("%h %s %B");
var data = alpine.parseLine("www.brain-salad.com 403 4321");
@pxlpnk
pxlpnk / brakeman output
Last active January 28, 2019 07:26
brakeman scan result for RailsGoat
Loading scanner...
Processing application in /Users/at/src/github.com/OWASP/railsgoat
Processing gems...
[Notice] Detected Rails 5 application
Processing configuration...
[Notice] Escaping HTML by default
Parsing files...
Processing initializers...
Processing libs...sed
Processing routes...
$ bundle audit check --update
Updating ruby-advisory-db ...
From https://github.com/rubysec/ruby-advisory-db
* branch master -> FETCH_HEAD
Already up to date.
Updated ruby-advisory-db
ruby-advisory-db: 322 advisories
Name: omniauth-oauth2
Version: 1.0.2
$ bundle exec rubocop --require rubocop-gitlab-security
Inspecting 121 files
.....CC.....CC..C..C....................C................................................................................
Offenses:
app/controllers/api/v1/mobile_controller.rb:11:44: C: GitlabSecurity/JsonSerialization: Don't use to_json without specifying only
respond_with model.find(params[:id]).to_json
^^^^^^^
app/controllers/api/v1/mobile_controller.rb:18:30: C: GitlabSecurity/JsonSerialization: Don't use to_json without specifying only
@pxlpnk
pxlpnk / 355.patch
Created September 24, 2018 11:33
patch syntax highlighting
From 9eea6bc2cd680cb78c7258e8e4873bf3d09391c3 Mon Sep 17 00:00:00 2001
From: Andreas Tiefenthaler <[email protected]>
Date: Thu, 20 Sep 2018 18:23:19 +0700
Subject: [PATCH] Fix broken link in CVE-2014-4920
Closes: #354
---
gems/twitter-bootstrap-rails/OSVDB-109206.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@pxlpnk
pxlpnk / cache.go
Created December 19, 2018 11:11
A super simple key ValueStore to practise some golang
package cache
import "fmt"
// Item represents an item within the cache
type Item struct {
Object interface{}
}
// Cache represents the data structure for storing items in memory
#!/usr/bin/env ruby
require 'optparse'
class CommitParser
def self.parse(args)
options = {}
opts = OptionParser.new do |opts|
opts.banner = 'Usage: name'