This file contains 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
class User < ActiveRecord::Base | |
alias :devise_valid_password? :valid_password? | |
def valid_password?(password) | |
begin | |
devise_valid_password?(password) | |
rescue BCrypt::Errors::InvalidHash | |
return false unless Digest::SHA1.hexdigest(password) == encrypted_password | |
logger.info "User #{email} is using the old password hashing method, updating attribute." | |
self.password = password |
This file has been truncated, but you can view the full file.
This file contains 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
{ | |
"version": "2023-06-01T233830+0200-frab", | |
"base_url": "https://re-publica.com/", | |
"conference": { | |
"acronym": "rp23", | |
"title": "re:publica 2023", | |
"start": "2023-06-05", | |
"end": "2023-06-07", | |
"daysCount": 4, |
This file contains 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
// Unblock everyone on Twitter: Go to https://twitter.com/settings/blocked and paste the below in DevTools | |
// Yes this is super ugly and hacky don’t @ me | |
function click_all_unblock_buttons() { document.querySelectorAll('button.blocked-text').forEach(btn => btn.click()); } | |
function unblock(min_num_accounts) { | |
var checkNumber, autoScroll, curScrollPos, prevScrollPos, checkScroll, done; | |
done = false; | |
curScrollPos = prevScrollPos = window.scrollY; | |
checkScroll = setInterval(() => { |
This file contains 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
<h3>Bookmarklet time!</h3> | |
<a href="javascript:var css = '*{font-family:"Comic Sans MS" !important;}'; var head = document.getElementsByTagName('head')[0]; var s = document.createElement('style'); s.setAttribute('type', 'text/css'); if (s.styleSheet) { s.styleSheet.cssText = css; } else { s.appendChild(document.createTextNode(css)); } head.appendChild(s);">Comicsansify!</a> | |
<p>Drag this to your Bookmarks Bar.</p> |
This file contains 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
#!/bin/bash | |
#set -x | |
: ${num_parallel:=8} | |
: ${parallel:=parallel} | |
: ${cycle_time:=10} | |
# rate_limit_sleep_time=15 | |
# default_rate_limit_sleep_time=$rate_limit_sleep_time | |
cursor="-1" |
This file contains 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
Name | Installed capacity (MW) | Location | Voltage level connection (KVT) | Creation date | |
---|---|---|---|---|---|
Nuclear BELLEVILLE 1 | 1310 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BELLEVILLE 2 | 1310 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BLAYAIS 1 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BLAYAIS 2 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BLAYAIS 3 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BLAYAIS 4 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BUGEY 2 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BUGEY 3 | 910 MW | FRANCE | 400 KVT | 01/01/2000 | |
Nuclear BUGEY 4 | 880 MW | FRANCE | 400 KVT | 01/01/2000 |
This file contains 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
<wordlist locale="de" description="Deutsch" date="1339787575" version="15" options="german_umlaut_processing"> | |
<!-- snip --> | |
<w f="0" flags="">Dummkopf</w> | |
<w f="0" flags="n">after</w> | |
<w f="0" flags="n">anal</w> | |
<w f="0" flags="n">angekettet</w> | |
<w f="0" flags="n">anus</w> | |
<w f="0" flags="n">ausgezogen</w> | |
<w f="0" flags="r">bastard</w> | |
<w f="0" flags="r">besoffen</w> |
This file contains 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
#!/usr/bin/perl | |
my $ssh="/usr/bin/ssh"; | |
my $mosh="/usr/bin/mosh"; | |
my $host; | |
my $unsupported=0; | |
for (my $i=0; $i <= $#ARGV; $i++) { | |
if ($ARGV[$i] =~ /^-/) { | |
$ssh .= " \"$ARGV[$i]\""; |
This file contains 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 'happy' | |
class TestApp < Happy::Controller | |
def route | |
on 'hello-:name' do | |
"Hello, #{params['name']}!" | |
end | |
"Try #{link_to 'this', current_url('hello-hendrik')}!" | |
end |
This file contains 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
module Haml::Filters | |
module Scss | |
include Base | |
lazy_require 'sass/plugin' | |
def render(text) | |
::Sass::Engine.new(text, ::Sass::Plugin.engine_options.merge(:syntax => :scss)).render | |
end | |
end | |
end |
NewerOlder