I hereby claim:
- I am lambdalisue on github.
- I am lambdalisue (https://keybase.io/lambdalisue) on keybase.
- I have a public key ASBZIH_RGffOoVv_5tfnY5LlFQR3vfTF19AiLk2543RStAo
To claim this, I am signing this object:
# coding=utf-8 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
try: | |
from PySide import QtCore | |
from PySide import QtGui | |
except ImportError: | |
from PyQt4 import QtCore | |
from PyQt4 import QtGui |
#!/bin/bash | |
####################################################################### | |
# Install "nvim" on Ubuntu/Debian | |
# | |
# Author: lambdalisue | |
# License: MIt | |
# | |
####################################################################### | |
if ! which porg >/dev/null 2>&1; then | |
echo 'A program manager "porg" is required.' |
I hereby claim:
To claim this, I am signing this object:
<details open markdown="block"> | |
<summary>Table of contents</summary> | |
<ul> | |
<li> | |
<a href="#services">Services</a> | |
<ul> | |
{{- range .Files}}{{range .Services}} | |
<li><a href="#{{.FullName | lower | replace "." ""}}">{{.LongName}} (<code>{{.FullName}}</code>)</a></li> | |
{{- end}}{{end}} | |
</ul> |
#!/usr/bin/env bash | |
#============================================================================== | |
# Install Mac OS X GUI Application via brew cask | |
#============================================================================== | |
brew cask install google-chrome | |
brew cask install thunderbird | |
brew cask install dropbox | |
brew cask install copy | |
brew cask install slack | |
brew cask install the-unarchiver |
use anyhow::{anyhow, Result}; | |
use std::io::Write; | |
// MIT: Atanas Yankov <atanas.yankov98@gmail.com> | |
// https://github.com/atanunq/viuer/blob/3b99255f0d1586dd5b8cb1d409fa8515d9e77493/Cargo.toml#L10 | |
// https://github.com/atanunq/viuer/blob/3b99255f0d1586dd5b8cb1d409fa8515d9e77493/src/printer/sixel.rs#L23 | |
pub fn render_image(image: &image::DynamicImage) -> Result<()> { | |
let image = image.resize(128, 128, image::imageops::Nearest); | |
let encoder = sixel::encoder::Encoder::new() | |
.map_err(|e| anyhow!("failed to create a sixel encoder: {:?}", e))?; |
#!/bin/bash | |
# | |
# Usage: | |
# | |
# download-gh-release {user}/{repo} {file} [{tag}] | |
# | |
repo=$1 | |
file=$2 | |
tag=${3:-latest} |
const tagPattern = /\*(.+)\(\)\*/; | |
function* parse(content: string): Generator<{ fn: string, args: string[] }> { | |
const lines = content.split("\n"); | |
const founds = lines.flatMap((v, i) => { | |
const m = v.match(tagPattern); | |
if (!m) { | |
return []; | |
} | |
const index = i; |
import asyncio | |
import sys | |
# Ctrl-C (KeyboardInterrupt) does not work well on Windows | |
# This module solve that issue with wakeup coroutine. | |
# https://stackoverflow.com/questions/24774980/why-cant-i-catch-sigint-when-asyncio-event-loop-is-running/24775107#24775107 | |
if sys.platform.startswith('win'): | |
def hotfix(loop: asyncio.AbstractEventLoop) -> asyncio.AbstractEventLoop: | |
loop.call_soon(_wakeup, loop, 1.0) | |
return loop |
#!/bin/bash | |
#============================================================================== | |
# An install script of GVim in Ubuntu/Debian | |
#============================================================================== | |
echo "Installing required packages ..." | |
sudo apt-get install -yq build-essential curl | |
sudo apt-get install -yq \ | |
libncurses5-dev \ | |
libbonoboui2-dev \ |