Skip to content

Instantly share code, notes, and snippets.

View Hoto-Cocoa's full-sized avatar
🚙
Driving

Cocoa Hoto Hoto-Cocoa

🚙
Driving
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sokcuri on github.
  • I am sokcuri (https://keybase.io/sokcuri) on keybase.
  • I have a public key ASBGPO6bp5nFVmEhVPGZJFU4qD-uQZoqlyamsJZU0IXzzQo

To claim this, I am signing this object:

@perillamint
perillamint / node.service
Created February 17, 2017 03:12
systemd unit for node app
[Unit]
Description=Your awesome nodejs app
After=network.target
[Service]
User=awesome_user_account_name_here
Environment=NODE_ENV=production
ExecStart=/opt/awesomenode/launcher_script.sh
Restart=on-failure
@hinaloe
hinaloe / Twitter Cramming.user.js
Last active September 28, 2017 05:35 — forked from if1live/Twitter Cramming.user.js
Force enable cramming (280 character tweets) on Twitter. NOTE: Stops working when you switch pages, refresh to fix. https://twitter.com/Prof9/status/912859110776950784
// ==UserScript==
// @name Twitter Cramming
// @description Force enable cramming (280 character tweets) on Twitter
// @author Prof. 9
// @version 0.1
// @match https://twitter.com/*
// @run-at document-idle
// @namespace prof9.twittercramming
// ==/UserScript==
@vaskoz
vaskoz / StringHashCollisionGenerator.java
Created June 4, 2013 03:44
Generates Java Strings with the same hashCode.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class StringHashCollisionGenerator {
public static void main(String[] args) {
if (args.length != 1) {
printUsage();
System.exit(1);
// Dirty overload the native function
var parseInt = function(arg1) {
if (arg1 === "Infinity") {
return NaN;
}
if (arg1 === "Infinity+1") {
return "Infinity1";
}
if (arg1 === "1+1+1") {
return "3?";
@lifthrasiir
lifthrasiir / inquiry.md
Last active July 30, 2019 13:15
"구글, 'https' 채택 안한 누리집에 안전하지 않은 곳 '낙인'" 기사에 대한 의견

아래 메일은 2017-02-12 21:43(이하 한국 표준시)에 한겨레 기사에 대한 의견으로서 기사에 제시된 김재섭 기자의 메일로 보낸 내용이다. 메일에서 사실 관계 등의 오류가 있다면 모두 나의 실수이다.

2017-02-13 14:53에 덧붙임: 더 이상 gist를 비공개로 할 이유가 없어졌으므로 공개로 전환. 이 메일에 대한 답변은 받았으나 공개할 만큼 중요한 반론이 들어 있진 않으며 공개 여부도 묻지 않았으므로 공개하지 않는다. 아래 글 자체에도 다양한 비문과 오자가 있으나 본래 보낸 내용을 살리기 위해 전혀 수정을 하지 않기로 했음을 양해 바람.

2017-02-13 19:00에 덧붙임: 이 기사의 후속으로 구글코리아 측의 기자간담회가 올라갔다. 새 기사에 대해서는 특이한 게 없으므로 노코멘트. 또한 위의 기사 링크를 미디어다음에서 한겨레 웹사이트로 가도록 수정.

원문

안녕하십니까, 귀하께서 작성하신 (물론 저는 그 진위를 알 수 없습니다만, 적어도 그렇게 나와 있는) 기사에 대한 의견을 제기하고자 메일을 씁니다. 이 메일은 저의 개인 의견이며 저를 고용하고 있는 회사나 단체 등의 의견을 전혀 대변하지 않음을 혹시나 싶지만 미리 밝혀 둡니다.

@fawkesley
fawkesley / readonly_pi.markdown
Last active March 28, 2020 06:47
Mount raspberry pi filesystems as readonly

WinRM 사용 정리

WinRM 초기 설정

  • PowerShell (Run as Administrator)
# Service Enable 
winrm qc 

# 인증 및 AllowUnencrypted 설정 
@hakasenyang
hakasenyang / index.php
Last active July 22, 2021 09:45
ssl.hakase.io source
<?php
// Tor Check : https://gist.github.com/TheRealBastiaan/889b4ec5fafd928e0de2
function IsTorExitPoint($ip=null){
$ip = ($ip) ? $ip : $_SERVER['REMOTE_ADDR'];
if (gethostbyname(ReverseIPOctets($ip).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
return true;
} else {
return false;
}
}
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>