Skip to content

Instantly share code, notes, and snippets.

@dlintw
dlintw / st24.Dockerfile
Created February 7, 2014 09:16
Dockerfile for build STLinux sh4 build environment
# dockerfile ref: http://docs.docker.io/en/latest/use/builder/
# command usage ref: http://docs.docker.io/en/latest/commandline/cli/
# http://docs.docker.io/en/latest/use/port_redirection/#port-redirection
# Build image (replace <NAME> to any name)
# docker build -t <NAME>/st24 - < st24.Dockerfile
# Run
# docker run -d -v /opt/tmp:/tmp:rw -p 127.0.0.1:20022:22 <NAME>/sshd
# ssh -p 20022 root@localhost # password: root
@dlintw
dlintw / root_xperia502.sh
Created August 29, 2015 09:41
script for root xperia 5.0.2 android
cat <<EOT
此root用於Xperia Z 5.0.2 [10.6.A.0.454]
僅發佈於apk.tw 請勿轉載
By cat1221 ,cat605101
Translate to Linux by dlintw
其他機型.版本未測試 盡量不要用在次外的版本
無法百分之百保證可以 但請按照指示行走 未完成請勿按下一步!
過程會用到KingRoot當跳板 但會清除乾淨 擔心者請勿使用
請先把手機拔離電腦 靜待指示
---------------------------------------------
@dlintw
dlintw / 剪刀石頭布.jl
Last active July 24, 2021 15:43
我的第一隻 Julia 小遊戲
# Julia 剪刀石頭布
# 1. 變數可用中文
# 2. 加上 try catch 錯誤處理
# 3. 加上多行註解 #= =#
# 4. 採用公式計算結果
"""
`input(prompt::AbstractString="")`
Read a string from STDIN. The trailing newline is stripped.
#!/bin/bash
set -ex
cd /tmp
#pacman -S --needed --noconfirm base-devel
#git clone https://aur.archlinux.org/nosudo
#cd nosudo
#makepkg -o
#cp nosudo /bin/sudo
@dlintw
dlintw / patchdbg
Created June 1, 2019 05:16
replace dbg: as dbg:<line_number>
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path"
"regexp"
@dlintw
dlintw / PKGBUILD
Created April 18, 2019 03:39
patched url for vim-clang-format-git
# Maintainer : Jason Raymond Bell <jason@epixxware.com>
_pkgname="vim-clang-format"
pkgname="vim-clang-format-git"
pkgver=1
pkgrel=1
pkgdesc='Plugin which uses clang for formatting C and C++ code. Git version.'
arch=(any)
url='https://github.com/rhysd/vim-clang-format'
license=('MIT')
@dlintw
dlintw / console.log
Created March 25, 2019 00:06
boot sh4twbox on sda3 with ext3 failed
Board: STx7105-PDK [32-bit mode]
U-Boot 1.3.1 (Oct 6 2013 - 04:36:18) - stm23_0045
DRAM: 256 MiB
SPI: ST M25P80 (1MiB) device (page=256,erase=4096)
In: serial
Out: serial
Err: serial
@dlintw
dlintw / nextvod kernel boot log
Created September 12, 2013 00:04
sh4twbox [639108], kernel[88b563]
Board: STx7105-PDK [32-bit mode]
U-Boot 1.3.1 (Aug 31 2013 - 10:44:00) - stm23_0045
DRAM: 256 MiB
SPI: ST M25P80 (1MiB) device (page=256,erase=4096)
In: serial
Out: serial
Err: serial
@dlintw
dlintw / gist:4a289efb35cebae7396c
Created July 10, 2015 08:38
mouse fail on xbmc
NextVOD:~# usb 4-1: USB disconnect, address 2
usbmouse: can't resubmit intr, stm-ohci.1-1/input0, status -19
usb 4-1: new low speed USB device using stm-ohci and address 3
usb 4-1: configuration #1 chosen from 1 choice
input: Primax Icon7 Twister Evolution Laser Mouse as /devices/platform/stm-usb.1/stm-ohci.1/usb4/4-1/4-1:1.0/input/input2
usb 4-1: USB disconnect, address 3
usb 4-1: new low speed USB device using stm-ohci and address 4
usb 4-1: configuration #1 chosen from 1 choice
input: A4Tech USB Mouse as /devices/platform/stm-usb.1/stm-ohci.1/usb4/4-1/4-1:1.0/input/input3
/usr/bin/ld: stri_brkiter.o: in function `StriBrkIterOptions::setType(SEXPREC*, char const*)':
stri_brkiter.cpp:(.text+0x9c): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `vtable for icu_61_stringi::UnicodeString' defined in .data.rel.ro._ZTVN14icu_61_stringi13UnicodeStringE[_ZTVN14icu_61_stringi13UnicodeStringE] section in icu61/common/unistr.o
/usr/bin/ld: stri_brkiter.cpp:(.text+0x9c): warning: too many GOT entries for -fpic, please recompile with -fPIC
/usr/bin/ld: final link failed: symbol needs debug section which does not exist
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/share/R//make/shlib.mk:6: stringi.so] Error 1
make[1]: Leaving directory '/tmp/Rtmptqa7sb/R.INSTALL267e59b4e33f/stringi/src'
ERROR: compilation failed for package ‘stringi’