Skip to content

Instantly share code, notes, and snippets.

View eddyb's full-sized avatar

Eduard-Mihai Burtescu eddyb

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<locale
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="l10n_output.xsd"
locale="enGB">
<e id="0">GLOBAL_SUCCESS</e>
<e id="1">GLOBAL_PERMISSION_ERROR</e>
<e id="2">GLOBAL_NOT_CONNECTED</e>
<e id="3">GLOBAL_BAD_TOKEN</e>
@eddyb
eddyb / mx-search
Last active April 15, 2023 06:42
Matrix offline regex search (using JSON exports from Element)
fn pop<T, ..Stack>((_, ..stack): (T, ..Stack)) -> Stack {
stack
}
fn dup<T: Clone, ..Stack>((x, ..stack): (T, ..Stack)) -> (T, T, ..Stack) {
(x.clone(), x, ..stack)
}
fn swap<T, U, ..Stack>((x, y, ..stack): (T, U, ..Stack)) -> (U, T, ..Stack) {
(y, x, ..stack)
use git2::Delta;
use git2::DiffOptions;
use git2::Repository;
use std::collections::BTreeMap;
use std::env::set_current_dir;
use std::process::Command;
fn main() {
let repo = Repository::open_from_env().unwrap();
set_current_dir(repo.workdir().unwrap()).unwrap();
var fs = require('fs'), http = require('http'), path = require('path'), url = require('url'), domJS = require('dom-js');
function camel(name) {
return name.length ? name[0].toLowerCase() + name.slice(1).replace(/[^\w#]+\w/g, function(x) {return x[1].toUpperCase();}) : '';
}
function nonStrictDOM() {
var dom = new domJS.DomJS;
dom.strict = false;
return dom;
trace:crypt:CryptAcquireContextW (0x180ea88, (null), (null), 1, f0000040)
trace:crypt:RSAENH_CPAcquireContext (phProv=0xa7df780, pszContainer=(null), dwFlags=f0000040, pVTable=0xa7df800)
trace:crypt:CryptGenRandom (0xa7df770, 32, 0x180eaac)
trace:crypt:RSAENH_CPGenRandom (hProv=00000001, dwLen=32, pbBuffer=0x180eaac)
trace:crypt:CryptReleaseContext (0xa7df770, 00000000)
trace:crypt:RSAENH_CPReleaseContext (hProv=00000001, dwFlags=00000000)
trace:crypt:CertCloseStore ((nil), 00000000)
trace:crypt:CertFreeCertificateChainEngine ((nil))
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
// cargo-deps: hsl, image, csv = "1.0.0-beta.4", serde, serde_derive
// ~~~ PUBLIC DOMAIN ~~~
// I, the copyright holder of this work, hereby release it
// into the public domain. This applies worldwide.
// In case this is not legally possible, I grant any entity
// the right to use this work for any purpose, without any
// conditions, unless such conditions are required by law.
extern crate csv;
use async::fs::File;
use async::io::Async;
fn copy(src: &Path, dst: &Path) -> impl Async<()> {
let src = try!(File::open(src));
let dst = try!(File::create(dst));
// Copy a kiB at a time.
let mut buffer = Vec::with_capacity(1024);
loop {
// blowfish.cpp C++ class implementation of the BLOWFISH encryption algorithm
// _THE BLOWFISH ENCRYPTION ALGORITHM_
// by Bruce Schneier
// Revised code--3/20/94
// Converted to C++ class 5/96, Jim Conger
#include "blowfish.h"
#include "blowfish.h2" // holds the random digit tables
#define S(x,i) (SBoxes[i][x.w.byte##i])
/*icon nav*/
/* 1 */
html.MTCenabled #fbRequestsJewel a.jewelButton, html.MTCenabled #fbRequestsJewel a.jewelButton:hover, html.MTCenabled #fbRequestsJewel a.jewelButton:focus{
background-image: url(https://ssl10.ovh.net/~ecclesia/myFacebook/img/sprite.png) !important;
background-position: -56px -134px !important;
}
html.MTCenabled #fbRequestsJewel a.jewelButton:active{
background-image: url(https://ssl10.ovh.net/~ecclesia/myFacebook/img/sprite.png) !important;
background-position: -25px -134px !important;
}