Skip to content

Instantly share code, notes, and snippets.

View defeated's full-sized avatar
💭
I may be slow to respond.

eddie cianci defeated

💭
I may be slow to respond.
View GitHub Profile
@defeated
defeated / github-api-graphql-stale-branches.go
Last active August 4, 2020 14:01
GitHub API GraphQL - list stale branches
package main
import _ "github.com/joho/godotenv/autoload"
import "github.com/shurcooL/githubv4"
import "golang.org/x/oauth2"
import (
"context"
"fmt"
"log"
@defeated
defeated / github-api-graphql-stale-branches.rb
Created May 21, 2018 21:01
GitHub API GraphQL - list stale branches
# https://github.com/Shopify/graphql-ruby-client
require 'graphql_client'
require 'net/http'
client = GraphQL::Client.new(Pathname.new('github-schema.json')) do
configure do |c|
c.url = 'https://api.github.com/graphql'
c.username = ENV['GITHUB_USERNAME']
c.password = ENV['GITHUB_ACCESS_TOKEN']
end
end
@defeated
defeated / rise-of-iron_sim-node.txt
Last active September 27, 2016 00:54
rise of iron sim node
) ,
,g@L @@L
,@@@@L @@@@L
,@@@@@@L @@@@@@k,
,@@@@@@@@L @@@@@@@@b,
,@@@@@@@@@@L @@@@@@@@@@@,
y@@@@@@@@@@@@L @@@@@@@@@@@@@.
g@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@.
,g@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@L
,@@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@L
@defeated
defeated / keybase.md
Created July 20, 2016 14:47
keybase.md

Keybase proof

I hereby claim:

  • I am defeated on github.
  • I am wisdombiscuit (https://keybase.io/wisdombiscuit) on keybase.
  • I have a public key ASBI2y7YJ4JgY2oqKRLTdQ7EvL1zp4nsJhPnAEggdMPp-wo

To claim this, I am signing this object:

@defeated
defeated / gulpfile.js
Created April 12, 2015 15:28
gulp-postcss + autoprefixer
var gulp = require('gulp'),
postcss = require('gulp-postcss'),
autoprefix = require('autoprefixer-core');
gulp.task('css', function() {
return gulp.src('test.css')
.pipe(postcss([ autoprefix() ]))
.pipe(gulp.dest('dist/css'));
});
@defeated
defeated / gist:6969933
Created October 14, 2013 02:48
ruby console spinner proof
require 'curses'
Curses.init_screen
10.times do
Curses.setpos(0,0)
Curses.addstr("|")
Curses.refresh
sleep 0.33
Curses.setpos(0,0)
outlook.com
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
@defeated
defeated / node-bench.sh
Created February 12, 2013 23:47
node vs ruby benchmarks ;)
$ time node -v
v0.8.19
real 0m0.016s
user 0m0.010s
sys 0m0.005s
it "should create a new test set" do
expect { @preview_test.save }.should change(user.test_sets, :count).by(1)
@preview_test.test_set.tap do |t|
t.account.should == account
t.user.should == user
t.service.should == email_service
end.should be_valid
end
@defeated
defeated / gist:1975752
Created March 5, 2012 01:11 — forked from dhh/gist:1975644
safer mass assignment from dhh
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private