Skip to content

Instantly share code, notes, and snippets.

@rickycodes
rickycodes / main.rs
Created December 1, 2022 17:24
sudoku
use std::collections::HashSet;
struct Quad(Vec<Vec<Cell>>);
struct Row(Vec<Cell>);
struct Cell(u8);
impl Quad {
fn is_valid(&self) -> bool {
let mut values = HashSet::new();
alias ext='cd ~/projects/metamask-extension'
alias mobile='cd ~/projects/metamask-mobile'
# lock the screen
alias afk='xdg-screensaver lock'
alias away=afk
# copy paste lifted from OSX
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
● Intel® Xeon® E-2276M with vPro (2.80GHz, up to 4.70GHz with Turbo Boost, 6 Cores, 12MB Cache)
● Windows 10 Pro for Workstations 64
● Windows 10 Pro for Workstations 64 English
● 32GB DDR4 2666MHz
● 256GB Solid State Drive, M.2 PCIe-NVMe, Opal
● 256GB
● 15.6" FHD (1920 x 1080) IPS, 300 nits, anti-glare
● NVIDIA® Quadro® T1000
● Fingerprint Reader
● Backlit Keyboard - US English

Keybase proof

I hereby claim:

  • I am rickycodes on github.
  • I am rickycodes (https://keybase.io/rickycodes) on keybase.
  • I have a public key whose fingerprint is 938F 93B0 5391 F0F1 0990 E76F 03BE 37E6 E20E AC45

To claim this, I am signing this object:

$ sudo docker exec -it rr cargo build --verbose --target=armv7-unknown-linux-gnueabihf
Fresh autocfg v1.0.0
Fresh cfg-if v0.1.10
Fresh lazy_static v1.4.0
Fresh futures v0.1.29
Fresh semver-parser v0.7.0
Fresh slab v0.4.2
Fresh scopeguard v1.1.0
Fresh fnv v1.0.6
Fresh cc v1.0.50
@rickycodes
rickycodes / output.txt
Created March 29, 2020 05:16
--target=wasm32-unknown-emscripten doesn't work with external crate :/
$ cargo build --target=wasm32-unknown-emscripten
Compiling ncurses v5.99.0
error: failed to run custom build command for `ncurses v5.99.0`
Caused by:
process didn't exit successfully: `/home/ricky/projects/card/target/debug/build/ncurses-d2e3d48f734a75d8/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rustc-link-lib=ncurses
OPT_LEVEL = Some("0")
@rickycodes
rickycodes / countdown.sh
Created January 21, 2020 20:09
countdown alias
# usage `countdown seconds` eg: `countdown 10` `countdown 60*15` etc.
countdown() {
_date=$((`date +%s` + $1));
while [ "$_date" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($_date - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
}
const express = require('express')
const app = express()
const port = 3000 // get this from config
const host = 'localhost' // get this from config
const startUpMsg = `proxy listening on port ${port}!`
const serveIndex = require('serve-index')
const Dat = require('dat-node')
const path = require('path')
// this dats folder could also be configurable
#!/bin/bash
say ricky is not not unavailahhbelle, please leave a massage and he will get back to you -v zarvox -r 140 &&
say short leeeee b b b b b b b b b b b b b b -v zarvox -r 1 &&
say be be be -v zarvox -r -
@rickycodes
rickycodes / assign_example.jsx
Last active September 29, 2016 16:19
react/jsx style props example using Object.assign
import style from './style'
// example usage of Object.assign (needs to be shimmed) to mix things together
export default React.createClass({
render() {
return (
<aside style={Object.assign({color:'red'}, style.aside)} />
)
}
})