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
SELECT replace(replace(replace(replace(replace(cast(notification_level AS varchar), '0', 'muted'), '1', 'regular'), '2', 'tracking'), '3', 'watching'), '4', 'watching first post') AS notification_level, count(*) FROM category_users WHERE category_id=(SELECT id FROM categories WHERE slug='development' AND parent_category_id=(SELECT id FROM categories WHERE slug='add-ons' AND parent_category_id IS NULL)) GROUP BY notification_level; |
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/sh | |
echo "What should this computer be called?" | |
read this_name | |
echo "What should the other computer be called?" | |
read that_name | |
echo "What's the hostname of the other computer?" | |
read that_hostname | |
echo "What's the path to the respository on this computer?" | |
read this_path |
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
PostUpload.all.each do |post_upload| | |
Jobs.enqueue(:pull_hotlinked_images, post_id: post_upload.post.id) unless post_upload.post.nil? | |
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
- git clone https://github.com/LeoMcA/discourse-auth0-mozilla.git | |
- cd discourse-auth0-mozilla | |
- git checkout 2de31ec2442c4dabf4fc2561b6413b4651af65d4 | |
- cd ../ |
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
.category-mozillians-nda { | |
.d-header { | |
background: #5a166f; | |
.title:after { | |
content: 'NDA'; | |
color: #fff; | |
font-weight: bold; | |
font-size: 28px; | |
position: relative; |
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
https://github.com/LeoMcA/namati-user-card-profile-theme |
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
function createHexHash (algo, arrayBuffer, callback) { | |
if (Object.prototype.toString.call(arrayBuffer) == '[object String]') { | |
var encoder = new TextEncoder('utf-8') | |
arrayBuffer = encoder.encode(arrayBuffer) | |
} | |
crypto.subtle.digest(algo, arrayBuffer).then(function (hash) { | |
var hex = "" | |
var array = new Uint8Array(hash) | |
for (var i = 0; i < array.byteLength; i++) { | |
var byte = array[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 "mysql2" | |
require File.expand_path(File.dirname(__FILE__) + "/base.rb") | |
class ImportScripts::PhpBB3 < ImportScripts::Base | |
ARCHIVE_ID = 0 | |
INTRODUCTION_ID = 22 | |
PHPBB_DB = "phpbb" | |
BATCH_SIZE = 1000 |
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
{ | |
"ECIDsToParties": { | |
"INDPT": "Independent", | |
"PP85": "UK Independence Party (UKIP)", | |
"PP90": "Liberal Democrats", | |
"PP52": "Conservative Party", | |
"PP804": "Trade Unionist and Socialist Coalition", | |
"PP77": "Plaid Cymru - The Party of Wales", | |
"PP73": "Socialist Labour Party", |
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
var webrtc = require('wrtc'); | |
var RTCPeerConnection = webrtc.RTCPeerConnection; | |
var RTCSessionDescription = webrtc.RTCSessionDescription; | |
var RTCIceCandidate = webrtc.RTCIceCandidate; | |
var pc1 = new RTCPeerConnection(); | |
var pc2 = new RTCPeerConnection(); | |
pc1.onicecandidate = function(candidate) { |