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 / node-modules-recursive-packer.go
Last active November 14, 2023 13:08
node_modules Recursive packer
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"sync"
@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 / httpGzipTest.go
Created February 24, 2021 16:07
Golang decompress gzip of response came from http.request
func Request() {
client := &http.Client{
//CheckRedirect: redirect
Transport: &http.Transport{DisableCompression: false},
}
req, err := http.NewRequest("GET","https://jsonplaceholder.typicode.com/todos/1", nil)
req.Header.Add("Accept-Encoding", "gzip, deflate")
if err != nil {
fmt.Println("Failed to create new request.")
@skyend
skyend / ss
Created February 22, 2021 06:31
/per/mbo-reg/goal-hists?coId=1&buId=1&evalId=20&goalDgr=1&goalId=6
@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 / gist:2e61a734d2a14198bd15781bf45a61f9
Last active June 21, 2018 17:46
vmware workstation player error! at windows 10 [solved]

슈밤 왜안되는거야

윈도우 10에 VMWare workstation player 설치하고 쓰다가 vm을 껏다가 켰더니 아래와 같은 에러 메시지와 함께 나를 헬파티로 초대했다.

문제의 시작 에러

VMware Player and Device/Credential Guard are not compatible. 
VMware Player can be run after disabling Device/Credential Guard. 
Please visit http://www.vmware.com/go/turnoff_CG_DG for more details.
@skyend
skyend / chain_detect.js
Created May 24, 2018 11:10
Chained Characters
var a = "efgaaa123";
var chain = 0;
var chains = [];
var prev = -1, prev2, current;
for(let i= 0; i < a.length; i++ ){
current = a.charCodeAt(i);
if( prev + 1 == current && prev2 + 1 == prev ){
chain ++;
chains.push(String.fromCharCode.apply(null, [prev2, prev, current]))
HTML
<table width="100%" border="1" style="background-color: #CCCCCC;" responsive="true" summary="table"><tbody id='tbody'><tr responsive="true"> <th scope="col"> <b>국가</b> </th> <th scope="col"> <b>언어</b> </th> <th scope="col"> <b>코드</b> </th> <th scope="col"> <b>언어 값</b> </th> </tr><tr> <td data-th=" 국가 "> <p>오스트레일리아</p> </td> <td data-th=" 언어 "> <p>영어</p> </td> <td data-th=" 코드 "> <p>en-au</p> </td> <td data-th=" 언어 값 "> <p>3081</p> </td> </tr><tr> <td data-th=" 국가 "> <p>오스트리아</p> </td> <td data-th=" 언어 "> <p>독일어</p> </td> <td data-th=" 코드 "> <p>de-at</p> </td> <td data-th=" 언어 값 "> <p>3079</p> </td> </tr><tr> <td data-th=" 국가 "> <p>벨기에(네덜란드어)</p> </td> <td data-th=" 언어 "> <p>네덜란드어</p> </td> <td data-th=" 코드 "> <p>nl-be</p> </td> <td data-th=" 언어 값 "> <p>2067</p> </td> </tr><tr> <td data-th=" 국가 "> <p>벨기에(프랑스어)</p> </td> <td data-th=" 언어 "> <p>프랑스어</p> </td> <td data-th=" 코드 "> <p>fr-be </p> </td> <td data-th=" 언어 값 "> <p>2060</p> </td> </tr><tr> <td data-th=" 국가 "> <p>브라질</p> </td> <td data-th=" 언어 "> <
@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후지큐 하이랜드 거대 유원지에서부터의 도주를 개발했고 출시했습니다.

@skyend
skyend / gist:cfc26761ebb3a357cbe9
Created July 11, 2014 14:49
docker service script for systemd
[Unit]
Description=Docker Mongodb image
After=mongo.service
[Service]
ExecStart=/bin/bash -c '/usr/bin/docker run -v /data/mongo:/data/mongo --name mongo -p 27017:27017 oym:mongo'
ExecStop=/bin/bash -c '/usr/bin/docker stop mongo && /usr/bin/docker rm mongo'
[Install]
WantedBy=multi-user.target