Skip to content

Instantly share code, notes, and snippets.

View rabidaudio's full-sized avatar

Julien Dorothy rabidaudio

View GitHub Profile
@scottbw
scottbw / jquery.oauth.js
Created November 6, 2011 00:23 — forked from andyedinborough/jquery.oauth.js
Introduces $.oauth() to make using OAuth from jQuery as easy as using $.ajax()
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@paulmillr
paulmillr / active.md
Last active May 15, 2025 11:20
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@johntyree
johntyree / getBlockLists.sh
Last active May 10, 2025 11:03
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active April 23, 2025 13:36
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
@chenr2
chenr2 / keyboard.md
Last active February 2, 2016 16:32
Swift: dealing with keyboards

The keyboard keeps obscuring my content

TODO: WIP. Need to test next time I integrate this.

See Greg Heo's video ScrollView tutorial on raywenderlich.com.

Text boxes can get covered up by the keyboard, especially on 3.5 inch screens (4s). The first step is to embed the page contents inside a UIScrollView.

@IBOutlet weak var scrollview: UIScrollView!

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@raulraja
raulraja / TwitterHandle.kt
Created February 20, 2020 12:16
Type Refinements with Type Proofs in Kotlin
/* Coming up ~ April 2020 */
package test
import arrow.*
inline class TwitterHandle(val handle: String) {
companion object : Refined<String> {
override val validate: String.() -> Map<String, Boolean> = {
mapOf(
"Should start with '@'" to startsWith("@"),
@bertrandmartel
bertrandmartel / credentials
Last active August 21, 2024 15:39
Assume role with MFA for terraform/terragrunt (https://stackoverflow.com/a/66878739/2614364)
[prod]
aws_secret_access_key = redacted
aws_access_key_id = redacted
[tf_temp]
[tf]
credential_process = sh -c 'mfa.sh arn:aws:iam::{account_id}:role/{role} arn:aws:iam::{account_id}:mfa/{mfa_entry} prod 2> $(tty)'
@LoneRabbit
LoneRabbit / ddp-to-kunaki.py
Last active December 4, 2024 16:46 — forked from mzero/ddp-to-kunaki.py
Convert DDP mastered CDs to Kunaki's CUE format
"""Convert DDP mastered CDs to Kunaki's CUE format.
tl;dr:
Type in CMD where the script is located in:
python ddp-to-kunaki.py "my-cool-cd-ddp-dir" "my-cool-cd-kunaki" <-- Yes, you need to put in quotation marks
ddp-to-kunaki.py - name of script
my-cool-cd-ddp-dir - path to ddp files IN QUOTATION MARKS
my-cool-cd-kunaki - name of your cue and iso files for Kunaki IN QUOTATION MARKS
This will produce two files:
my-cool-cd-kunaki.CUE <-- the markers