Skip to content

Instantly share code, notes, and snippets.

View jules2689's full-sized avatar

Julian Nadeau jules2689

View GitHub Profile
@jules2689
jules2689 / 0_runner.rb
Last active April 29, 2020 14:12
Geekbot tracking issue workflow
require "optparse"
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'octokit', '4.18.0'
gem 'cli-kit', '3.3.0'
end
args = { manager: nil, geekbot_schedule: "TODO", geekbot_token: "TODO", github_token: "TODO", repo: "TODO" }

Dear DCS Undergrad Students,

Now that your courses have moved to an online format, we wanted to check in with you and let you know that we (the faculty and staff of the Department of Computer Science) are thinking of you, and hoping that you are finding ways to stay well while staying home, as Prime Minister Justin Trudeau encouraged us all to do.

We know that many of you have already left Toronto for home, or are planning to travel soon, and that some of you have made the decision to stay in Toronto even though your families are somewhere else. Regardless of where you are, we wish you well and hope you stay safe.

As we have all begun working from home, we recognize that this experience can be quite challenging and isolating for many of us, even if being at home is safer. We have been sharing tips with each other about how we plan to take care of ourselves in the coming weeks, and want to share some of our advice with you. Not all of these will feel right for everyone, but we hope you find some of them val

What is the idea?

GitHub is the world's most popular place to host versioned code, but fails to surface meaningful data at an organization level.

GitHub organizes code into repositories, and further organizes it into owners.

image

This story may seem like a great way to capture information, but we're letting the majority of information fall through the cracks. Organizations, particularly Enterprises, don't organize their code like this. Repositories are used for a ton of reasons, all of which we fail to truly capture.

@jules2689
jules2689 / db_fixtures_dump.rake
Last active September 30, 2019 18:49 — forked from ecleel/db_fixtures_dump.rake
Rails 6: Dump Rails db to fixtures
# Original from http://snippets.dzone.com/posts/show/4468 by MichaelBoutros
# Forked from https://gist.github.com/ecleel/3dc89a753bac6a54bf8d170f63256f19
#
# Optimized version which uses to_yaml for content creation and checks
# that models are ActiveRecord::Base models and not abstract class before trying to fetch
# them from database.
#
# Also supports nested resources and namespaces them correctly
#
# Tested in Rails 6.0.0
@jules2689
jules2689 / Help.md
Last active April 22, 2019 18:35
Outline of message/greetings handling in a slack bot

Adding your own channel greeting

All you need to do is to add your own text in the greetings.yml file.

Example

CHANNEL_NAME:
  text: |
 This is a multi line message
This file has been truncated, but you can view the full file.
[
{
"course_title": "Gamification",
"link": "https://www.coursera.org/courses/gamification",
"description": "Gamification is the application of game elements and digital game design techniques to non-game problems, such as business and social impact challenges. This course will teach you the mechanisms of gamification, why it has such tremendous potential, and how to use it effectively. For additional information on the concepts described in the course, you can purchase Professor Werbach's book For the Win: How Game Thinking Can Revolutionize Your Business in print or ebook format in several languages.",
"image": "https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera.s3.amazonaws.com/topics/gamification/large-icon.png",
"price": "free",
"department": [
"computer-science/design-and-product",
"business/marketing"

Usage:

puts "What is your favourite colour?"
InteractivePrompt.call(%w(red green blue yellow purple orange))

Renders this:

selector

@jules2689
jules2689 / after.txt
Last active March 17, 2017 16:59
An example input and output for DiaTeX
Markdown
---
This is a markdown file
```ruby
ruby_var = 'ruby_var'
```
<!---
```latex
import Foundation
class Secrets {
enum SecretsError: Error {
case NotFound
}
class func secrets() -> Dictionary<String, Any?> {
if let path = Bundle.main.path(forResource: "Secrets", ofType: "plist") {
if let dict = NSDictionary(contentsOfFile: path) as? Dictionary<String, AnyObject> {