Skip to content

Instantly share code, notes, and snippets.

View Yardboy's full-sized avatar

Cayce Balara Yardboy

View GitHub Profile
@Yardboy
Yardboy / CTF 2014 Level 0
Created January 22, 2014 22:48
CTF 2014 Level 0
#!/usr/bin/env ruby
# Our test cases will always use the same dictionary file (with SHA1
# 6b898d7c48630be05b72b3ae07c5be6617f90d8e). Running `test/harness`
# will automatically download this dictionary for you if you don't
# have it already.
path = ARGV.length > 0 ? ARGV[0] : '/usr/share/dict/words'
entries = File.read(path).split("\n")
var DNA = function(sequence) {
var count, checkMarker;
var nucleotideCounts = {};
var displayedMarkers = ['A', 'T', 'C', 'G'];
var acceptedMarkers = displayedMarkers + ['U'];
count = function(marker){
checkMarker(marker);
return sequence.split(marker).length - 1;
}

Keybase proof

I hereby claim:

  • I am yardboy on github.
  • I am yardboy (https://keybase.io/yardboy) on keybase.
  • I have a public key whose fingerprint is D4DD 53FA 06C1 00F8 6C05 99C6 5E23 3796 3F29 EED8

To claim this, I am signing this object:

@Yardboy
Yardboy / gist:05bb7f5044d7db2bbf5a
Created August 27, 2014 18:51
Ruby any? and all? with an empty array as receiver.
2.0.0-p451 :001 > [].any? { |wtf| wtf.locked? }
=> false
2.0.0-p451 :002 > [].all? { |wtf| wtf.locked? }
=> true
@Yardboy
Yardboy / acceptable_use
Created February 9, 2015 23:26
The ridiculous "acceptable use policy" I have to agree to in order to access my kids' grades through a school district website.
DUVAL COUNTY PUBLIC SCHOOLS (DCPS) INFORMATION SECURITY PROGRAM
SUBJECT: ACCEPTABLE USE POLICY (AUP) POLICY NUMBER: 8.71
PURPOSE/SCOPE: This establishes the School Board Policy for Acceptable Use of Information Resources and applies to all users of DCPS information resources. Individuals using information resources belonging to DCPS must act in a legal, ethical, responsible, and secure manner, with respect for the rights of others.
The primary purpose of the DCPS network is to assist in preparing students for success in life and work in the 21st century. Computer and/or Electronic networks provide the ability to share educational and research resources from around the world. These resources include but are not limited to, access to instructional/business applications, interactive collaboration between teachers, students and other users, document sharing, and communications of all forms with people from around the world.
Access to computers, computing systems and networks owned by the School Board is a pri
git : + export DOKKU_HOST_ROOT=/home/dokku
At line:1 char:1
+ git push dokku HEAD:master > deploy.log 2>&1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (+ export DOKKU_HOST_ROOT=/home/dokku:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
+ DOKKU_HOST_ROOT=/home/dokku
+ export DOKKU_DISTRO
[
{
"Id": "8ead9a7d1f98c687db122d40ea9a47113f1c8af646f601eb12c070a741c32ef9",
"Created": "2020-04-24T21:17:36.824396163Z",
"Path": "irb",
"Args": [],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
remote: +++ [[ ! -f /home/dokku/shards/DOKKU_PROCFILE ]]
remote: +++ procfile-util show --procfile /home/dokku/shards/DOKKU_PROCFILE --process-type web --default-port 3000
remote: ++ DOKKU_PROCFILE_START_CMD='puma -C config/puma.rb'
remote: ++ START_CMD='puma -C config/puma.rb'
remote: ++ echo 'puma -C config/puma.rb'
remote: + START_CMD='puma -C config/puma.rb'
remote: + [[ false == \f\a\l\s\e ]]
remote: ++ docker run --label=dokku -d -e PORT=3000 --env=DATABASE_URL=mysql2://mysql:54de2f4cf18ab5fd@dokku-mysql-shardsdb:3306/shardsdb --env=DOKKU_APP_TYPE=dockerfile --env=DOKKU_DOCKERFILE_PORTS=3000 --env=DOKKU_PROXY_PORT=80 --env=DOKKU_PROXY_PORT_MAP=http:3000:3000 --env=GIT_REV=9bf44d8ebd18fdc88ff391156a148cf6c23abce4 --env=RACK_ENV=production --env=RAILS_ENV=production --env=RAILS_SERVE_STATIC_FILES=true --env=REDIS_URL=redis://shardsrd:80738cf6c4eb5851551ed3f76ce287aa3821b15f490287f5e544841452e2acee@dokku-redis-shardsrd:6379 --env=SECRET_KEY_BASE=0448b7a2219f8630d06e76c969ac50542b92c84762dd966f91293145cb52b
FROM ruby:2.6.5
LABEL app-name="shards"
RUN apt-get update -qq && apt-get install -y \
nodejs \
curl \
vim
# Create and set the working directory
import $ from 'jquery'
import _ from 'lodash'
<% klasses = [] %>
<% Dir[Rails.root.join('app', 'javascript', 'pages', '*_page.js*')].each do |file| %>
<%
page = file.match(%r{.*/pages/(.*).js?}).captures.first
next if page == 'base_page'
klasses << page.classify
%>