Skip to content

Instantly share code, notes, and snippets.

View skyend's full-sized avatar
๐Ÿข
Slow and pierce the world

Skyend skyend

๐Ÿข
Slow and pierce the world
View GitHub Profile
@skyend
skyend / RecordAudio.swift
Created January 9, 2023 13:52 — forked from hotpaw2/RecordAudio.swift
Swift Audio Recording class. Reads buffers of input samples from the microphone using the iOS RemoteIO Audio Unit API
//
// RecordAudio.swift
//
// This is a Swift class (updated for Swift 5)
// that uses the iOS RemoteIO Audio Unit
// to record audio input samples,
// (should be instantiated as a singleton object.)
//
// Created by Ronald Nicholson on 10/21/16.
// Copyright ยฉ 2017,2019 HotPaw Productions. All rights reserved.
@skyend
skyend / cloudflare.sh
Created May 17, 2020 09:09 — forked from Manouchehri/cloudflare.sh
Allow CloudFlare only
# Source:
# https://www.cloudflare.com/ips
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
# Avoid racking up billing/attacks
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable.
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP
@skyend
skyend / Android ๊ฐœ๋ฐœ์„ ์ˆ˜์ฃผํ•ด์„œ Kotlin์„ ์ œ๋Œ€๋กœ ์จ๋ดค๋”๋‹ˆ ์ตœ๊ณ ์˜€๋‹ค.md
Created April 10, 2018 16:09
Android ๊ฐœ๋ฐœ์„ ์ˆ˜์ฃผํ•ด์„œ Kotlin์„ ์ œ๋Œ€๋กœ ์จ๋ดค๋”๋‹ˆ ์ตœ๊ณ ์˜€๋‹ค๋ผ๋Š” ๊ธ€์„ ๋ฒˆ์—ญํ–ˆ์Šต๋‹ˆ๋‹ค.

Android ๊ฐœ๋ฐœ์„ ์ˆ˜์ฃผํ•ด์„œ Kotlin์„ ์ œ๋Œ€๋กœ ์จ๋ดค๋”๋‹ˆ ์ตœ๊ณ ์˜€๋‹ค.

๊ธ€์— ์•ž์„œ

์ด ๊ธ€์€ ์ผ๋ณธ์˜ omochimetaru๋‹˜์ด Qiita์— ์˜ฌ๋ฆฐ Android ๊ฐœ๋ฐœ์„ ์ˆ˜์ฃผํ•ด์„œ Kotlin์„ ์ œ๋Œ€๋กœ ์จ๋ดค๋”๋‹ˆ ์ตœ๊ณ ์˜€๋‹ค.๋ผ๋Š” ๊ธ€์„ ๋ฒˆ์—ญํ•ด์„œ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฒˆ์—ญ์„ ํ”์พŒํžˆ ํ—ˆ๋ฝํ•ด์ฃผ์‹  omochimetaru๋‹˜๊ป˜ ๊ฐ์‚ฌํ•˜๋‹ค๋Š” ๋ง์”€ ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๋˜ํ•œ ๊ธ€์—์„œ ํ•œ๊ตญ์—์„œ๋Š” ์“ฐ์ด์ง€ ์•Š๋Š” ํ‘œํ˜„๋“ค ๋“ฑ์— ๋Œ€ํ•ด์„œ๋Š” ์˜์—ญ์ด ์„ž์—ฌ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์  ์–‘ํ•ด ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ๋Šฆ์€ ์‹œ๊ฐ„๊นŒ์ง€ ์˜ค์—ญ์„ ์ฐพ๊ณ  ๋ฒˆ์—ญ์˜ ์งˆ์„ ๋†’์ด๋Š”๋ฐ ๋งŽ์€ ๋„์›€์„ ์ฃผ์‹œ๊ณ  ์˜คํžˆ๋ ค ์ €๋ณด๋‹ค ๋งŽ์ด ๊ณ ์ƒํ•ด์ฃผ์‹  ์ด์ƒํ•œ๋ชจ์ž„์˜ pluulove๋‹˜, chiyodad๋‹˜, lemonade๋‹˜๊ป˜๋„ ๊ฐ์‚ฌํ•˜๋‹ค๋Š” ๋ง์”€ ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์ฝ์–ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

Kotlin์„ ์‹ค๋ฌด ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.

๋ฉฐ์น  ์ „, ์ œ๊ฐ€ ์†Œ์†๋œ Qoncept์—์„œ "๋ฆฌ์–ผ ์ˆ ๋ž˜์žก๊ธฐ"xํ›„์ง€ํ ํ•˜์ด๋žœ๋“œ ๊ฑฐ๋Œ€ ์œ ์›์ง€์—์„œ๋ถ€ํ„ฐ์˜ ๋„์ฃผ๋ฅผ ๊ฐœ๋ฐœํ–ˆ๊ณ  ์ถœ์‹œํ–ˆ์Šต๋‹ˆ๋‹ค.