Skip to content

Instantly share code, notes, and snippets.

@lholden
lholden / gist:f8bd29154129d6fba1013de6dcf59685
Created December 30, 2018 23:43
Fedora 29 & Slack & App Indicator support
https://extensions.gnome.org/extension/615/appindicator-support/
( can install via the "Software" application )
sudo dnf install libappindicator libappindicator-gtk3 python2-appindicator
sudo cp /usr/share/code/libnode.so /usr/lib/slack/libnode.so
edit /usr/share/applications/slack.desktop
Exec=env XDG_CURRENT_DESKTOP=ubuntu:GNOME /usr/bin/slack %U
[Scorpion Navy Issue, Scorpion Navy Issue fit]
Ballistic Control System II
Ballistic Control System II
Ballistic Control System II
Capacitor Flux Coil II
Capacitor Flux Coil II
Gist X-Type Large Shield Booster
Shield Boost Amplifier II

Keybase proof

I hereby claim:

  • I am lholden on github.
  • I am lholden (https://keybase.io/lholden) on keybase.
  • I have a public key ASAj3j9zQLpcRTdjbmnPGCEGw1rDPnIF8zREQkI7Y09fNgo

To claim this, I am signing this object:

{% if flash %}
<div class="alert alert-dismissible rounded-bottom fade show alert-{{flash.name | replace(from="error", to="danger")}}" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<strong class="pr-3">
{% if flash.name == "error" %}
<span class="fa fa-times-circle fa-lg"></span>
{% elif flash.name == "warning" %}
<span class="fa fa-exclamation-circle fa-lg"></span>
use uuid;
use postgres;
use r2d2;
use std::num;
#[derive(Debug, Serialize)]
pub enum Error {
InvalidParam(String),
DatabaseError(String),
RecordNotFound(String),
use std::env;
use std::time::Duration;
use postgres::tls::openssl::OpenSsl;
use r2d2::{self, PooledConnection};
use r2d2_postgres::{TlsMode, PostgresConnectionManager};
use rocket::Request;
use rocket::request::{Outcome, FromRequest};
use rocket::Outcome::{Success, Failure};
use rocket::http::Status;
#[get("/", format="application/json")]
fn list() -> &'static str {
"{}"
}
#[get("/", rank=2)]
fn index() -> &'static str {
"second"
}
/*
@lholden
lholden / gist:4f9ffdac31cc40ed5af250e8edd495ad
Created September 9, 2016 07:08
Retro computer build - inventory
Inventory:
O: Ordered
Epox EP-MVP3G2 Super Socket 7 Motherboard
3x 128MB PC133 RAM
AMD K6-III+ 450Mhz CPU
- alt. AMD K6-II 450Mhz CPU
StarTech Socket 7 CPU Cooler
@lholden
lholden / gist:e0f0d26ad38cb5c73c8a
Created February 17, 2016 01:04
MSys2 bash prompt
declare MAX_PATH_LENGTH=40
declare COLOR_PATH="\[\e[34;1m\]"
declare COLOR_EXTRAS="\[\e[35m\]"
declare COLOR_MSYSTEM="\[\e[1;31;40m\]"
declare COLOR_HOST=""
declare COLOR_RESET="\[\e[0m\]"
function prompt_path {
local path="$1"
@lholden
lholden / gist:7107811
Last active January 25, 2019 23:54
Random FizzBuzz implementations of mine.I've contributed each version to: http://rosettacode.org/wiki/FizzBuzz
Haskell:
-------
fizzBuzz :: (Integral a) => a -> String
fizzBuzz i
| fizz && buzz = "FizzBuzz"
| fizz = "Fizz"
| buzz = "Buzz"
| otherwise = show i
where fizz = i `mod` 3 == 0
buzz = i `mod` 5 == 0