Skip to content

Instantly share code, notes, and snippets.

View Qs-F's full-sized avatar

たふみ Qs-F

View GitHub Profile
@graven
graven / colortest.py
Created April 15, 2011 07:50
Small utility to test terminal support for 256-color output.
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored
@justinabrahms
justinabrahms / colortest.py
Created June 26, 2011 17:10 — forked from graven/colortest.py
Small utility to test terminal support for 256-color output.
#!/usr/bin/env python
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
"%02x/%02x/%02x" % (r, g, b)
for r in colored
@abstractOwl
abstractOwl / index.html
Created July 11, 2014 06:54
Aspect-Oriented Programming Example. Live: http://jsfiddle.net/z8GXU/
<!DOCTYPE html>
<html lang="en">
<head>
<title>AOP Example</title>
<style type="text/css">
#log {
background: #EEE;
height: 300px;
overflow: auto;
}
@aroder
aroder / install_ffmpeg_with_librtmp.sh
Last active July 29, 2021 15:58
shell script to install FFmpeg with librtmp, which is necessary to use it with DaCast. Much of this comes from http://help.dacast.com/hc/en-us/articles/202357380-Stream-on-DaCast-under-Linux-with-ffmpeg
#!/bin/bash
# this scripts assumes Ubuntu 14.04 LTS
# ensure the following sources are in /etc/apt/sources.list
# deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse
@bcherny
bcherny / typescript-effect-system.ts
Last active July 19, 2021 17:07
designing an effect system in typescript
type Effect<A> = {type: A}
interface IO<A> {}
interface NetworkIO<A> extends IO<A> {}
interface DOMMutation<A> {}
interface DOMAppend<A> extends DOMMutation<A> {}
interface DOMRemove<A> extends DOMMutation<A> {}
function request<A>(url: string): Promise<A> & Effect<NetworkIO<A>> {
@zacky1972
zacky1972 / pldi18main-p10-p.md
Created June 2, 2019 11:41
Ryu: Fast Float-to-String Conversion

https://dl.acm.org/citation.cfm?id=3192369

やばい論文を見つけた。たとえるなら,世界中でありふれた野菜炒めで世界一だと認められたようなもの。一刻も早く全文を読みたい。

Abstract

We present Ryu, a new routine to convert binary floating point numbers to their decimal representations using only fixed-size integer operations, and prove its correctness. Ryu is simpler and approximately three times faster than the previously fastest implementation.

解決したい技術的課題

@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@omo
omo / Dockerfile
Created February 1, 2021 05:26
oauth2-proxy on Cloud Run
FROM alpine:3.13
WORKDIR /opt/draft-proxy
RUN apk update && apk add git curl
RUN curl -L -o package.tgz https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v6.1.1/oauth2-proxy-v6.1.1.linux-amd64.tar.gz && \
tar xvzf package.tgz && \
mv oauth2-proxy-*.linux-amd64/oauth2-proxy .
CMD ["./oauth2-proxy", \
"--provider=github", "--github-org=YOUR_GITHUB_ORG", "--email-domain=*", \
"--http-address=0.0.0.0:8080", \
"--reverse-proxy=true", \
@treastrain
treastrain / Task :shared:linkDebugFrameworkIosX64 FAILED
Last active March 20, 2021 13:35
Task :shared:linkDebugFrameworkIosX64 FAILED
Command line invocation:
/Applications/Xcode-12.5.0-Beta.3.app/Contents/Developer/usr/bin/xcodebuild -project /Users/treastrain/AndroidStudioProjects/MyKMMApplication/./iosApp/iosApp.xcodeproj -scheme iosApp OBJROOT=/Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios SYMROOT=/Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios -sdk iphoneos -arch arm64
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
ARCHS = arm64
OBJROOT = /Users/treastrain/AndroidStudioProjects/MyKMMApplication/build/ios
SDKROOT = iphoneos14.5