Skip to content

Instantly share code, notes, and snippets.

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 Aug 4, 2020
GitHub API GraphQL - list stale branches
View github-api-graphql-stale-branches.go
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
GitHub API GraphQL - list stale branches
View github-api-graphql-stale-branches.rb
# 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 Sep 27, 2016
rise of iron sim node
View rise-of-iron_sim-node.txt
) ,
,g@L @@L
,@@@@L @@@@L
,@@@@@@L @@@@@@k,
,@@@@@@@@L @@@@@@@@b,
,@@@@@@@@@@L @@@@@@@@@@@,
y@@@@@@@@@@@@L @@@@@@@@@@@@@.
g@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@.
,g@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@L
,@@@@@@@@@@@@@@P` "Q@@@@@@@@@@@@@L
View 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 Apr 12, 2015
gulp-postcss + autoprefixer
View gulpfile.js
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 Oct 14, 2013
ruby console spinner proof
View gist:6969933
require 'curses'
Curses.init_screen
10.times do
Curses.setpos(0,0)
Curses.addstr("|")
Curses.refresh
sleep 0.33
Curses.setpos(0,0)
View free_email_provider_domains.txt
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 Feb 12, 2013
node vs ruby benchmarks ;)
View node-bench.sh
$ time node -v
v0.8.19
real 0m0.016s
user 0m0.010s
sys 0m0.005s
View preview_test_spec.rb
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 Mar 5, 2012 — forked from dhh/gist:1975644
safer mass assignment from dhh
View gist:1975752
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private