Skip to content

Instantly share code, notes, and snippets.

@patio11
patio11 / app_controllers_slack_controller.rb
Created November 26, 2015 09:01
Implementing a /healthcheck endpoint in Slack to read out consul status in a human-readable fashion
class SlackController < ApplicationController
skip_before_action :verify_authenticity_token
@@slack_security_tokens =
["copy-paste-the-token-you-get-from-Slack-when-configuring-the-integration-here"]
before_filter :bounce_access_not_from_slack
def healthcheck
services = SystemStatus.list_services
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@jvns
jvns / interview-questions.md
Last active July 6, 2024 08:32
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@zackrw
zackrw / Gemfile
Created September 27, 2012 16:16
Yale CAS and user info with Rails (after security "upgrade" on LDAP)
#
## Add the rubycas-client gem to your Gemfile and run bundle install
#
gem 'rubycas-client'
gem 'mechanize'
# Paginate a collection
#
# Usage:
#
# {% paginate contents.projects by 5 %}
# {% for project in paginate.collection %}
# {{ project.name }}
# {% endfor %}
# {% endpaginate %}
#
@baygross
baygross / Gemfile
Created March 17, 2012 04:17
Yale CAS + LDAP integration with Rails
#
## Add these gems to your Gemfile, and be sure to 'bundle install'
#
gem 'net-ldap'
gem 'rubycas-client'
@bsodmike
bsodmike / gist:1369419
Created November 16, 2011 06:25
Subdomain Routing with Rails 3.1

Implement Routing for Subdomains

Rails 3.0 introduced support for routing constrained by subdomains.

A subdomain can be specified explicitly, like this:

match '/' => 'home#index', :constraints => { :subdomain => 'www' }