I hereby claim:
- I am remi on github.
- I am remi (https://keybase.io/remi) on keybase.
- I have a public key whose fingerprint is 0EB8 6575 1221 3709 D835 08F6 2601 D146 D7E8 4CB5
To claim this, I am signing this object:
#!/bin/bash | |
# | |
# Call this script, passing an image filename | |
# Creates an intensified version | |
convert='convert' | |
realpath='realpath' | |
# flight check: must have imagemagick | |
if [ ! $(which $convert) ]; then |
[alias] | |
etat = status | |
pousser = push | |
tirer = pull | |
commettre = commit | |
ranger = stash | |
ajouter = add | |
enlever = rm | |
cloner = clone | |
fusionner = merge |
#!/usr/bin/env ruby | |
# 1. Install hunspell | |
# $ brew install hunspell | |
# 2. Download a dictionary and install it in a path listed by `hunspell -D` | |
# $ open http://wiki.services.openoffice.org/wiki/Dictionaries | |
# 3. Move this file into your repository | |
# $ mv commit-msg /path/to/repo/.git/hooks |
#!/bin/bash | |
# Usage: | |
# | |
# 1. Create a `apple-news` file somewhere in your $PATH with the content of this file | |
# 2. That’s it! You can now use the `apple-news` utility: | |
# | |
# ``` | |
# $ apple-news https://apple.news/AKoDCWtVEQP2w7Ld657lgIg | |
# https://www.theguardian.com/technology/2022/mar/30/dyson-launches-zone-air-purifying-bluetooth-headphones-with-visor |
// Extract JSON payload from SHC QR code (without any kind of private/public key verification) | |
// Credits + inspiration | |
// https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb | |
// Usage | |
// $ node shc.js "shc:/01234569…" | |
const zlib = require("zlib"); |
defmodule Example1 do | |
@default_now DateTime.utc_now() | |
def foo(now \\ @default_now) do | |
IO.puts(now) | |
end | |
end | |
defmodule Example2 do | |
def foo(now \\ DateTime.utc_now()) do |
[alias] | |
verbs = !git log --pretty=format:'%s' | cut -d \" \" -f 1 | sort | uniq -c | sort -nr |
I hereby claim:
To claim this, I am signing this object:
# bundle exec rake cache:clear | |
namespace :cache do | |
desc "Clear Rails.cache" | |
task :clear do | |
Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(Rails.configuration.cache_store) | |
Rails.cache.clear | |
puts "Successfully cleared Rails.cache!" | |
end | |
end |
When an ActiveRecord model has more than one belongs_to
association, calling delete_all
on an ActiveRecord::Associations::CollectionProxy
will not delete the records but unassociate them. That might be a problem in a table with a NOT NULL
clause.
Client.create
# => #<Client id: 1, created_at: "2013-08-14 17:43:42", updated_at: "2013-08-14 17:43:42">
Team.create
# => #<Team id: 1, created_at: "2013-08-14 17:43:55", updated_at: "2013-08-14 17:43:55">