Skip to content

Instantly share code, notes, and snippets.

@omz
omz / FontInstaller.py
Last active January 31, 2025 20:34
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@youpy
youpy / ej
Last active November 6, 2017 00:44
#!/bin/bash
# src: http://taka.no32.tk/diary/20050826.html
set -e
KEY=`echo $@ | nkf -w -w80 | sed 's/ /+/g'`
URI="https://eow.alc.co.jp/search?q=$KEY"
CONTENT=`curl -s -e='http://eow.alc.co.jp/' \
-A 'Mozilla/5.0' "$URI" | \
sed -ne '/<ul/,/<\/ul>/p' | grep -v '<li[^>]*><a ' | grep -v '"tango"' | w3m -dump -T 'text/html'`
---
data:
- created_at: 2011-12-26T16:44:40+09:00
created_by: viagraviagra
data:
charset: utf8
lang: ''
url: http://sorttext.jgate.de/convert?q=%s
xpath: ''
database_resource_url: http://wedata.net/databases/Text%20Conversion%20Services

Raspberry Pi を動く状態にする

description

Raspberry Pi を最低限使える状態にする = ディスプレイはテレビ、ネットワークは有線、キーボードを USB で接続する、SDカードに OS を突っ込む。あと電源用の micro-B USB ケーブル。

discussion

  • テレビへの接続: RCAケーブル or HDMIケーブル 1 本、ある程度の長さがあったほうが置き場所に困らなくて良さそう
  • ネットワークへの接続: 適当な LAN ケーブル 1 本、これも部屋横断できるぐらい長いのがあるとセットアップ時に困らなさそう、セットアップ後は適当な短いのに置き換えたい。
@kohyama
kohyama / stm.md
Last active February 9, 2023 05:35
Clojure ref, atom, agent の要約
@shinyaohira
shinyaohira / App States and Multitasking.md
Last active October 5, 2023 07:57
アプリケーションの状態とマルチタスキング

全体的に簡略化し、必要と思われる部分を抜粋しました。

  • Not running

    アプリは起動されていないか、実行されていたけれどもシステムによって終了されています。

  • Inactive

@kozy4324
kozy4324 / launchd_memo.md
Last active March 11, 2024 03:56
launchd, launchctlについて(導入編)

launchd, launchctl

man

$ man launchd
$ man launchctl
$ man launchd.plist

$ man plutil

@dustin
dustin / tcpproxy.go
Last active March 20, 2025 00:47
hex dumping tcp proxy
package main
import (
"encoding/hex"
"flag"
"io"
"io/ioutil"
"log"
"net"
"os"
@vitorgalvao
vitorgalvao / Get Title and URL.applescript
Last active December 10, 2024 01:34
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Webkit variants include "Safari", "Webkit", "Orion".
-- Specific editions are valid, including "Safari Technology Preview".
-- "Safari" Example:
tell application "Safari" to return name of front document
@kristianmandrup
kristianmandrup / pdf_converter.rb
Last active May 31, 2019 09:29
Jekyll PDF Converter using PDFKit
require 'pdfkit'
require 'nokogiri'
require 'haml'
# config/initializers/pdfkit.rb
PDFKit.configure do |config|
# Note: Often required for Windows OS configuration
# config.wkhtmltopdf = '/path/to/wkhtmltopdf'