Skip to content

Instantly share code, notes, and snippets.

View callicles's full-sized avatar

Nicolas Joseph callicles

View GitHub Profile
import java.sql.*;
import java.util.*;
public class Hello {
public static void main(String[] args) throws Exception {
Connection conn = null;
Statement stmt = null;
PreparedStatement ps = null;
ResultSet rset = null;
ResultSetMetaData md = null;
@callicles
callicles / bigquery-github-1.sql
Created September 2, 2016 20:52
Will give you the number of repository that did not receive any commit within the last year
SELECT COUNT(sub_github.repo_name)
FROM (
SELECT i.repo_name, MAX(committer.time_sec) as MaxDate
FROM [bigquery-public-data:github_repos.commits] AS i
GROUP BY i.repo_name
) AS sub_github
WHERE sub_github.MaxDate < ((NOW() / 1000000) - 31622400)

Keybase proof

I hereby claim:

  • I am callicles on github.
  • I am callicles (https://keybase.io/callicles) on keybase.
  • I have a public key whose fingerprint is AC3D F877 10A7 FB7C D81B 6595 7F72 0C32 CC00 75B3

To claim this, I am signing this object:

@callicles
callicles / watcher.rb
Created February 3, 2015 10:23
File watcher and live reload for Chrome on MAC OS
#!/usr/bin/env ruby
# watch.rb by Brett Terpstra, 2011 <http://brettterpstra.com>
# with credit to Carlo Zottmann <https://github.com/carlo/haml-sass-file-watcher>
trap("SIGINT") { exit }
if ARGV.length < 2
puts "Usage: #{$0} watch_folder keyword"
puts "Example: #{$0} . mywebproject"
exit
@callicles
callicles / gist:4809d4b9b951ace3ec32
Last active August 29, 2015 14:04
Configure postgres on Debian Wheezy 7.4 vagrant
# Used for creating a vagrant dev database server.
# Do not use as is for production purposes .
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'psqlVagrant';
sudo vim /etc/postgresql/9.1/main/pg_hba.conf
# modify the first line of the authentification rule with: