Skip to content

Instantly share code, notes, and snippets.

❄️

Andrew Plaza insipx

❄️
Block or report user

Report or block insipx

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
View revert-all.sh
#!/bin/bash
diesel migration revert
diesel migration revert
diesel migration revert
diesel migration revert
diesel migration run
View main.rs
use subxt::{Client, ClientBuilder, system::System, balances::Balances};
use tokio::runtime::Runtime as TokioRuntime;
use futures::{Future, Stream};
use node_runtime::{Runtime as RuntimeT, SignedExtra};
use srml_system::Trait;
use balances::Trait as BalancesTrait;
fn main() {
let mut rt = TokioRuntime::new().unwrap();
let client = ClientBuilder::<Runtime>::new().set_url(url::Url::parse("ws://127.0.0.1:9944").unwrap()).build();
@insipx
insipx / main.rs
Created May 10, 2019
Image Reading/Writing
View main.rs
use std::io::{Read, Write};
use std::fs::File;
fn main() {
let mut image = File::open("./image.jpg").unwrap();
let mut buffer = Vec::new();
let bytes = image.read_to_end(&mut buffer);
let mut out = File::open("./output.jpg").unwrap();
out.write(buffer.as_slice()).unwrap();
View keybase.md

Keybase proof

I hereby claim:

  • I am insipx on github.
  • I am insi (https://keybase.io/insi) on keybase.
  • I have a public key whose fingerprint is 56E2 B165 E9F4 EFF4 4EBB 5034 D598 5E06 B8CF DFE6

To claim this, I am signing this object:

@insipx
insipx / index.html
Created Jun 10, 2018
Space Invaders HTML5 Canvas
View index.html
<link href='https://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'>
<canvas id="game-canvas" width="640" height="640"></canvas>
View config
##
## i3 config
##
##
## Autostart
##
exec --no-startup-id "feh --bg-fill ~/pictures/wallpapers/wallpaper.jpg"
exec --no-startup-id "i3-msg 'workspace 0:::ArchLinux'"
exec --no-startup-id "nm-applet"
View init.vim
set nocompatible " be iMproved
filetype off " required!
set exrc
set secure
" Specify a directory for plugins
" " - For Neovim: ~/.local/share/nvim/plugged
" " - Avoid using standard Vim directory names like 'plugin'
" My Bundles here:
call plug#begin('~/.local/share/nvim/plugged')
View .tmux.conf
# use C-a, since it's on the home row and easier to hit than C-b set -g default-terminal "screen-256color"
set -g set-titles on
set -g set-titles-string '#(whoami)::#h::#(curl ipecho.net/plain;echo)'
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
View config
[options]
clickable_url = true
padding = 20
font = Hack 8
[colors]
# special
foreground = #ffeefc
foreground_bold = #ffeefc
View .tmux.conf
# use C-a, since it's on the home row and easier to hit than C-b set -g default-terminal "screen-256color"
set -g set-titles on
set -g set-titles-string '#(whoami)::#h::#(curl ipecho.net/plain;echo)'
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
You can’t perform that action at this time.