This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am daniel-worrall on github. | |
* I am dworrall (https://keybase.io/dworrall) on keybase. | |
* I have a public key ASAo7lE1O6SGkZcOx0Se7O3xMib9j4QBgQKOaNg8n_2fWAo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
file = File.open('list.txt', 'r') | |
File.open('shard.yml', 'w') do |f1| | |
f1.puts "name: 100projects\nversion: 0.1.0\n\nauthors:\n - <>\n\ntargets:\n" | |
while line = file.gets | |
filename = line.strip.gsub(/[^\w\.]/, '_').downcase | |
f1.puts " #{filename}:\n main: src/#{filename}/main.cr" | |
FileUtils::mkdir_p "src/#{filename}" | |
File.new "src/#{filename}/main.cr", 'w' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "github_api" | |
require "csv" | |
github = Github.new basic_auth: 'login:password' | |
users = github.activity.starring.list(user: 'username', repo: 'repo', auto_pagination: true) | |
CSV.open("users.csv", "wb") do |csv| | |
csv << ["User", "Location"] | |
users.each { |user| csv << [user.login, github.search.legacy.users(user.login).body.users[0].location] } | |
end |
NewerOlder