Skip to content

Instantly share code, notes, and snippets.

Chris Aniszczyk caniszczyk

Block or report user

Report or block caniszczyk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created Oct 9, 2012
Clone all repos from a GitHub organization
View clone-all-twitter-github-repos.sh
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@caniszczyk
caniszczyk / git-pre-receive-hook.sh
Created Oct 31, 2011
A reasonable git pre-receive-hook
View git-pre-receive-hook.sh
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
View gist:1ffa583555401777a9f6
### Keybase proof
I hereby claim:
* I am caniszczyk on github.
* I am zx (https://keybase.io/zx) on keybase.
* I have a public key whose fingerprint is 24B2 D8E1 F36E 2EFC 7ACC FE3B E7FB 2DB9 DF71 84CD
To claim this, I am signing this object:
@caniszczyk
caniszczyk / gist:8292751
Created Jan 7, 2014
sample-sonatype-settings
View gist:8292751
[tw-mba13-caniszczyk luna (master)]$ cat ~/.m2/settings.xml
<settings>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>caniszczyk</username>
<password>YOUR_PASSWORD</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
@caniszczyk
caniszczyk / gist:8177690
Last active Jan 1, 2016
Response to "An Engineer's Guide to US Visas"
View gist:8177690
  • TN visas: applies to also Mexicans
  • TNs depend heavily on your degree as they are mapped to TN: (a) there is a category for engineers if you have a formal degree in CS/ECE (b) if you don't have that degree but are an "engineer" (e.g., picked it up on your spare time) you can go through the "Management Consultant" route but to note that is the hardest TN to usually get and will pretty much depend how the visa officers treat you

I would definitely mention the Management Consultant route as there are a lot of people who may not be formally schooled in engineering but have picked it up. 5 years of "equivalent work experience" also can help you obtain this visa category

There is also hidden risks about potentially changing jobs with H1B / TN visas. ONLY SWITCH jobs if you are fully approved for the transfer and new visa. I've had friends that took the new job assuming the visa transfer would go through and were left having to vacate the country. This is the most thing I hate about immigration visas, it's real

@caniszczyk
caniszczyk / gist:8135894
Last active Jan 1, 2016
List of organizations (top 100) who open sourced the most private repos on GitHub in 2013 (as of Dec 26th)
View gist:8135894
quickly gathered using the Github Archive data, thanks @igrigorik
http://www.githubarchive.org/
SELECT repository_organization, count(repository_organization) as opens
FROM [githubarchive:github.timeline]
WHERE type="PublicEvent"
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC("2013-01-01 00:00:00")
GROUP BY repository_organization
ORDER BY opens DESC
LIMIT 100
View gist:6301197
/etc
/usr/lib
/usr/bin
char
scala
java
cache
solaris
linux (strong no hire if gnu is mentioned)
plan9
@caniszczyk
caniszczyk / mesos-stats.rb
Created Aug 21, 2013
Gets some basic statistics about Apache Mesos using the GitHub API
View mesos-stats.rb
#!/usr/bin/env ruby
require 'octokit'
require 'csv'
client = Octokit::Client.new(auto_traversal: true, per_page: 500);
puts client.ratelimit_remaining
CSV.open("stats.csv", "wb") do |csv|
repo = client.repo("apache/mesos")
stats = client.commit_activity_stats("apache/mesos")
total_commits_per_year = 0
@caniszczyk
caniszczyk / list.sql
Created Jan 18, 2013
List all pull requests for the Eclipse organization via the GitHub Archive
View list.sql
SELECT repository_name, repository_language, repository_description, url, payload_pull_request_head_repo_size, PARSE_UTC_USEC(created_at) as timestamp
FROM [githubarchive:github.timeline]
WHERE type="PullRequestEvent"
AND (
LOWER(repository_organization) CONTAINS "eclipse"
)
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-01-01 00:00:00')
ORDER BY timestamp DESC;
@caniszczyk
caniszczyk / github_profanity.sql
Created Dec 28, 2012
A query against the GitHub Archive for "seven dirty word" usage in 2012
View github_profanity.sql
SELECT repository_name, repository_language, repository_description, repository_watchers, payload_commit_msg, url, PARSE_UTC_USEC(created_at) as timestamp
FROM [githubarchive:github.timeline]
WHERE type="PushEvent"
AND (
LOWER(payload_commit_msg) CONTAINS "shit" OR
LOWER(payload_commit_msg) CONTAINS "piss" OR
LOWER(payload_commit_msg) CONTAINS "fuck" OR
LOWER(payload_commit_msg) CONTAINS "cunt" OR
LOWER(payload_commit_msg) CONTAINS "cocksucker" OR
LOWER(payload_commit_msg) CONTAINS "motherfucker" OR
You can’t perform that action at this time.