View localizable-encoding.sh
#!/bin/sh
ENCODING="utf-8"
for file in *.lproj/Localizable.strings; do
charset=`file -I "$file" | sed 's/.*charset=\(.*\)/\1/'`
if ! [[ "$charset" =~ "$ENCODING" ]]
then
output="$file.tmp"
iconv -f "$charset" -t "$ENCODING" "$file" > "$output" &&
View regex-find-unlocalized.txt
(?<!NSLocalizedString\()(?<!NSLog\()(?<!patternname:)(?<!imageNamed:)(?<!key:)(?<!@\{)(?<!\[)@".+"
View naver-cafe-chat-left-message.js
document.body.appendChild($('<style>div.my.msg{text-align:left;}</style>'));
View shout.xoul.kr
server {
listen 80;
server_name shout.xoul.kr;
location / {
proxy_pass http://127.0.0.1:4321;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
View git-pruneoff
#!/bin/bash
# https://gist.githubusercontent.com/devxoul/72adcb880b273a36420d/raw/git-pruneoff
# Delete merged branches.
git branch --merged | awk '{if($1 != "*" && $1 != "master") print $1}' | xargs git branch -d
View github-monospace-editor.js
// ==UserScript==
// @name GitHub Monospace Editor
// @namespace http://xoul.kr/github-monospace-editor
// @version 0.1.0
// @description Monospace GitHub Editor
// @match github.com/*/*/*
// @copyright 2014, devxoul
// ==/UserScript==
$(document.head).append($('<style>#pull_request_body { font-family: monospace; }</style>'));
View appkit-runtime-version-check.md

Runtime Version Check

There are several ways to check for new features provided by the Cocoa frameworks at runtime. One is to look for a given new class or method dynamically, and not use it if not there. Another is to use the global variable NSAppKitVersionNumber (or, in Foundation, NSFoundationVersionNumber):

double NSAppKitVersionNumber;
#define NSAppKitVersionNumber10_0 577
#define NSAppKitVersionNumber10_1 620
#define NSAppKitVersionNumber10_2 663
#define NSAppKitVersionNumber10_3 743
View line-length-linter.sh
#!/bin/bash
##
# The MIT License (MIT)
#
# Copyright (c) 2013-2014 Suyeol Jeon (http://xoul.kr)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
View CGFloatLiteral.swift
The MIT License (MIT)
Copyright (c) 2015 Suyeol Jeon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
View check-entitlements.sh
cp build/StyleShare.ipa build/StyleShare.zip
unzip build/StyleShare.zip -d build
codesign -d --entitlements :- "build/Payload/StyleShare.app"
security cms -D -i "build/Payload/StyleShare.app/embedded.mobileprovision" # | grep -i group