Skip to content

Instantly share code, notes, and snippets.

View rajanand's full-sized avatar
🎯
Focusing

Rajanand Ilangovan rajanand

🎯
Focusing
View GitHub Profile
@rasmusab
rasmusab / the-probability-my-son-will-be-stung-by-a-bumblebee.R
Created August 14, 2017 12:17
R and Stan script calculating the probability that my son will be stung by a bumblebee.
library(tidyverse)
library(purrr)
library(rstan)
### Defining the data ###
#########################
bumblebees <- c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 1, 0, 0, 0, 0, 0, 0)
toddler_steps <- c(26, 16, 37, 101, 12, 122, 90, 55, 56, 39, 55, 15, 45, 8)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active June 29, 2024 15:54
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
SELECT
CASE WHEN TipPercentage < 0 THEN 'No Tip'
WHEN TipPercentage BETWEEN 0 AND 5 THEN 'Less but still a Tip'
WHEN TipPercentage BETWEEN 5 AND 10 THEN 'Decent Tip'
WHEN TipPercentage > 10 THEN 'Good Tip'
ELSE 'Something different'
END AS TipRange,
Hr,
Wk,
TripMonth,
@ichernev
ichernev / moment-2.9.0.md
Last active August 29, 2015 14:12
Moment 2.9.0 changelog

moment 2.9.0 changelog

new languages

  • 2104 Frisian (fy) language file with unit test
  • 2097 add ar-tn locale

deprecations

  • 2074 Implement moment.fn.utcOffset, deprecate momen.fn.zone

new features

@darekkay
darekkay / trakt-backup.php
Last active June 18, 2024 14:28
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@staltz
staltz / introrx.md
Last active July 8, 2024 15:46
The introduction to Reactive Programming you've been missing
class MasterViewController: UIViewController, UINavigationControllerDelegate {
init() {
super.init(nibName: nil, bundle: nil)
}
}
extension MasterViewController: UITableViewDataSource {
func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@craigeley
craigeley / sifttter.rb
Last active July 23, 2018 16:37
This script looks for text files in a specific folder that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter
#!/usr/bin/ruby
# SIFTTTER 1.5: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
# Multiple Date Function by Paul Hayes 2014 <http://paulrhayes.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 67, and the location of your Day One in line 66
# * Scans leading timestamps in each line matching the selected dates
# * Does not alter text files in any way