Skip to content

Instantly share code, notes, and snippets.

@hyuki0000
hyuki0000 / sample.tex
Created February 4, 2017 08:27
Eulerフォント出す話
\documentclass[dvipdfmx]{jsbook}
\usepackage{lmodern}
\usepackage{ccfonts} % ccfonts を入れると、sin, cosだけじゃなくすべての英文がConcreteになってしまうので注意
\usepackage[euler-digits]{eulervm}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\pagestyle{empty}
\begin{document}

【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約

Infura Logo From Consensys

Infura 提供公開的 Ethereum 主網和測試網路節點。到 Infura 官網申請,只要輸入一點基本資料和 Email,就可以收到 API-key。

Infura API Key


# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
@shimpe
shimpe / fancy_captions.py
Last active May 17, 2024 02:41
fancy captions with moviepy
import PySide6.QtSvg
import PySide6.QtGui
import PySide6.QtCore
import moviepy.video.VideoClip
import moviepy.editor
import numpy as np
from moviepy.editor import *
from vectortween.PointAnimation import PointAnimation
from vectortween.SequentialAnimation import SequentialAnimation
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active May 17, 2024 02:41
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
// File: Skeleton.kt
@Composable
fun Skeleton(
modifier: Modifier = Modifier,
shape: Shape,
backgroundColor: Color = SkeletonTokens.BackgroundColor.toColor(),
contentColor: Color = SkeletonTokens.ContentColor.toColor(),
maxAlpha: Float = SkeletonTokens.MaxAlpha,
initialDelay: Int = 0,
animationSpec: InfiniteRepeatableSpec<Float> = if (initialDelay == 0) {
@AntonMZ
AntonMZ / ChangeLifetimeMiddleware.php
Last active May 17, 2024 02:38
Change Laravel SESSION_LIFETIME per user.
<?php
/**
* Insert middleware before \Illuminate\Session\Middleware\StartSession::class,
* Example:
* ChangeLifetimeMiddleware::class,
* \Illuminate\Session\Middleware\StartSession::class,
*/
namespace App\Http\Middleware;
@kekru
kekru / add CA cert on CentOS Debian Ubuntu.md
Last active May 17, 2024 02:38
Add CA cert to local trust store on CentOS, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@EricWiener
EricWiener / nuke_ios.bash
Created February 18, 2021 03:39
Clean out an XCode cache (React Native w/ Cocoapods)
#!/bin/bash
# This should be run from the /ios directory of your project
rm Podfile.lock
rm -rf Pods
rm -rf ~/Library/Caches/CocoaPods
rm -rf ~/Library/Developer/Xcode/DerivedData
pod cache clean --all
pod install