Skip to content

Instantly share code, notes, and snippets.

apiraino

Block or report user

Report or block apiraino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@apiraino
apiraino / gist:f7ac1852c230b6de9b76171520d29dc4
Last active Sep 8, 2019
Hide Explore Repositories on Github
View gist:f7ac1852c230b6de9b76171520d29dc4
// ==UserScript==
// @name Hide side columns on Github
// @namespace https://gist.github.com/apiraino/f7ac1852c230b6de9b76171520d29dc4
// @version 0.1
// @description Hide side columns on Github
// @author apiraino
// @match https://github.com/
// @grant none
// @run-at document-start
// @inject-into content
@apiraino
apiraino / config.yml
Last active Aug 17, 2019
Rust stable CircleCI config file (with sccache + rustfmt + clippy)
View config.yml
version: 2.1
commands:
install-system-deps:
steps:
- run:
name: Apt get stuff
command: |
# for codecov
# sudo apt install -y libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
sudo apt install memcached -y
@apiraino
apiraino / ckb-testnet-first-run.md
Last active May 26, 2019
CKB testnet first run
View ckb-testnet-first-run.md

Testing CKB testnet

Following these install instructions (very well detailed!) https://docs.nervos.org/getting-started/run-node

Trying the precompiled binaries

SSL 1.1.x not supported therefore Ubuntu 19.04 cannot run the precompiled binaries: will file an issue.

Can't easily install an obsolete OpenSSL version on Ubuntu 19.04

View gist:505a485bd6ac4536279d2f528245284d
fn delay_future() -> Box<Future<Item = (), Error = io::Error> + Send> {
let wait_time = Duration::from_millis(100);
let now = Instant::now();
let task = Interval::new(now, wait_time)
.map_err(|e| panic!("interval errored; err={:?}", e))
.take(10)
.for_each(|instant| {
println!("fire; instant={:?}", instant);
Ok(())
});
View cargo check false positive
pub struct MyStruct {
num: i32
}
impl MyStruct {
// setting to "pub", makes the warning disappear
fn new() -> MyStruct {
MyStruct { num : 2 }
}
View gist:4c8abac8d23398b2bd6dcd5d3d54e1df
(defun rust-test-fn (code expected-result)
(with-temp-buffer
(rust-mode)
(insert code)
;; check window before formatting
(let (w-start (window-start))
(message "%s" w-start)
)
(rust-format-buffer)
(should (equal expected-result (buffer-string)))
View brightness setting for i3 (using Gnome utility)
#!/usr/bin/env bash
# set -x
# /usr/lib/gnome-settings-daemon/gsd-backlight-helper
#Application Options:
# --set-brightness Set the current brightness
# --get-brightness Get the current brightness
# --get-max-brightness Get the number of brightness levels supported
View test.rs
struct Foo {}
impl Bar for Foo {
fn dummy_spacer() -> bool {
false
}
fn dummy_spacer() -> bool {
false
}
@apiraino
apiraino / gist:8fd8bbbe797ec12fe8dd2bd3a3f2d8f8
Created Jul 12, 2018
Langenscheidt OpenSearch description file
View gist:8fd8bbbe797ec12fe8dd2bd3a3f2d8f8
// Create these files on a webserver (also localhost is ok) and point your browser there
// Reference: https://developer.mozilla.org/en-US/docs/Web/OpenSearch
// lg.html
<html lang="en-US" dir="ltr" class="no-js">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8">
<link rel="search" type="application/opensearchdescription+xml" href="/lg_osd.xml" title="Langenscheidt Ita-Deu"/>
You should see a + icon on the custom search engine box.
You can’t perform that action at this time.