Skip to content

Instantly share code, notes, and snippets.

directory = Dir.entries('.')
output_file = "links.txt"
links = []
directory.each { |filename|
if File.directory?(filename)
next
else
source = File.open(filename).readlines
@gyng
gyng / buttface
Created December 4, 2011 16:57
javasux
#include <stdio.h>
int main(void)
{
printf("Hello world!");
return 0;
}
///////////////////
@gyng
gyng / bestmanner
Created February 19, 2012 07:29
bestmanner
00:00:07 - Fauxface to ALL: glhf
00:00:11 - iCpryde to ALL: hf
00:18:34 - iCpryde to ALL: zerg learned hydra good unit
00:18:48 - Fauxface to ALL: lol
00:19:15 - iCpryde to ALL: teheres nothign that kills them
00:20:36 - iCpryde to ALL: wow op as fuck
n = 0
for i in 1..2000000000 do
n += 1 if (i % 3 == 0 && i % 5 == 0)
end
puts n
#include <stdio.h>
int main(void) {
int n = 0;
int i;
for (i = 1; i < 2000000000; i++) {
if (i % 5 == 0 && i % 3 == 0)
n++;
}
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gyng
gyng / npmlist
Created June 25, 2013 14:33
npm list for Subway
user@box:/opt/subway# npm list
npm WARN package.json subway@0.3.0 No repository field.
npm WARN package.json cookie-signature@1.0.1 No repository field.
npm WARN package.json fresh@0.1.0 No repository field.
npm WARN package.json methods@0.0.1 No repository field.
npm WARN package.json range-parser@0.0.4 No repository field.
npm WARN package.json send@0.1.0 No repository field.
npm WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json mime@1.2.2 No repository field.
@gyng
gyng / shipment_tracker.rb
Last active December 21, 2015 19:09
shipping EXPERT
require 'rubygems'
require 'nokogiri'
require 'open-uri'
class ShipmentTrackerPlugin < Plugin
class ShipmentStatusRecord < Struct.new(:label, :status)
def to_s
if self.status
"\00303#{label}\003: #{status.ircify.gsub("\n", " ")}"
else
#define begin <%
#define End %>
#define as while
#define and ,
#define COUNTDOWN 10
#define Sub int
#define Dim int
#define cfoutput printf("%d ",
#define cfoutputted );