This file contains hidden or 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
// ==UserScript== | |
// @name Hide Twitter Trending | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://twitter.com/* | |
// @match https://*.twitter.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
// @grant GM_addStyle |
This file contains hidden or 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
% cat ~/.config/xfce4/terminal/accels.scm | |
(gtk_accel_path "<Actions>/terminal-window/new-tab" "<Super>t") | |
(gtk_accel_path "<Actions>/terminal-window/close-tab" "<Super>w") | |
(gtk_accel_path "<Actions>/terminal-window/copy" "<Super>c") | |
(gtk_accel_path "<Actions>/terminal-window/paste" "<Super>v") | |
(gtk_accel_path "<Actions>/terminal-window/search" "<Super>f") | |
(gtk_accel_path "<Actions>/terminal-window/prev-tab" "<Super>Left") | |
(gtk_accel_path "<Actions>/terminal-window/next-tab" "<Super>Right") | |
(gtk_accel_path "<Actions>/terminal-window/move-tab-left" "<Super><Shift>Left") | |
(gtk_accel_path "<Actions>/terminal-window/move-tab-right" "<Super><Shift>Right") |
This file contains hidden or 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 Range { | |
constructor(from, to, step = 1) { | |
this.value = from; | |
this.to = to; | |
this.step = step; | |
} | |
next() { | |
if (this.value > this.to) { | |
return { value: undefined, done: true }; |
This file contains hidden or 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
const path = require('path'); | |
const exec = require('child_process').exec; | |
function run(command) { | |
return new Promise((resolve, reject) => { | |
exec(command, function (error, stdout, stderr) { | |
if (error) { | |
reject(error); | |
} else { | |
resolve(stdout); |
This file contains hidden or 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
#include <inttypes.h> | |
#include <condition_variable> | |
#include <deque> | |
#include <iostream> | |
#include <memory> | |
#include <mutex> | |
#include <thread> | |
#include <variant> | |
#include <vector> |
This file contains hidden or 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
cita git:(develop) ? % make release | |
RUSTFLAGS='-F warnings' cargo build -j 1 --all --release | |
Compiling create-genesis v0.1.0 (/tmp/cita/tools/create-genesis) | |
Compiling librocksdb-sys v6.1.2 | |
error[E0277]: arrays only have std trait implementations for lengths 0..=32 | |
--> /tmp/cita/target/release/build/librocksdb-sys-9f0f3e945a905dbc/out/bindings.rs:3:8392 | |
| | |
3 | pub const __GNUC_VA_LIST : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __DARWIN_ONLY_64_BIT_INO_T : u32 = 0 ; pub const __DARWIN_ONLY_VERS_1050 : u32 = 0 ; pub const __DARWIN_ONLY_UNIX_CONFORMANCE : u32 = 1 ; pub const __DARWIN_UNIX03 : u32 = 1 ; pub const __DARWIN_64_BIT_INO_T : u32 = 1 ; pub const __DARWIN_VERS_1050 : u32 = 1 ; pub const __DARWIN_NON_CANCELABLE : u32 = 0 ; pub const __DARWIN_SUF_64_BIT_INO_T : & 'static [ u8 ; 9usize ] = b"$INODE64\0" ; pub const __DARWIN_SUF_1050 : & 'static [ u8 ; 6usize ] = b"$1050\0" ; pub const __DARWIN_SUF_EXTSN : & 'static [ u8 ; 14usize ] = b"$DARWIN_EXTSN\0" ; pub const __DARWIN_C_ANSI : u3 |
This file contains hidden or 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
// Reference: | |
// https://stackoverflow.com/questions/1031645/how-to-detect-utf-8-in-plain-c | |
export const isUtf8 = (data) => { | |
if (data.length <= 0) { | |
return false; | |
} | |
for (let i = 0; i < data.length; ) { | |
const a = data[i]; | |
if ([0x09, 0x0a, 0x0d].includes(a) || (0x20 <= a && a <= 0x7e)) { |
This file contains hidden or 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
package main | |
import ( | |
"os" | |
"fmt" | |
"net/http" | |
"github.com/gin-gonic/gin" | |
"github.com/kataras/iris" | |
"github.com/astaxie/beego" |
This file contains hidden or 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
" ACEJUMP | |
" Based on emacs' AceJump feature (http://www.emacswiki.org/emacs/AceJump). | |
" AceJump based on these Vim plugins: | |
" EasyMotion (http://www.vim.org/scripts/script.php?script_id=3526) | |
" PreciseJump (http://www.vim.org/scripts/script.php?script_id=3437) | |
" Type AJ mapping, followed by a lower or uppercase letter. | |
" All words on the screen starting with that letter will have | |
" their first letters replaced with a sequential character. | |
" Type this character to jump to that word. |
This file contains hidden or 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
/* | |
* clang++ -I/usr/local/include -pipe -std=c++11 -stdlib=libc++ -o main.cc.o -c main.cc | |
* clang++ -L/usr/local/lib -lpodofo -stdlib=libc++ -o b.out main.cc.o | |
* | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <list> | |
using namespace std; |
NewerOlder