This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# flippy | |
if which flippy 1>/dev/null; then | |
# usage: "F string" or "echo string | F" | |
alias -g F=__flippy | |
__flippy () { | |
if [[ $# > 0 ]]; then | |
flippy $@ | |
else | |
local s | |
while read s; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
@IBDesignable class __CustomView__: UIView { | |
@IBInspectable var labelText: String = "" { | |
didSet { | |
label.text = labelText | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Search Helper | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description My helper script for Google search | |
// @author Yumenosuke Koukata | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js | |
// @match *://www.google.com/* | |
// @match *://www.google.co.jp/* | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public static class ComponentExtensions { | |
public static T GetOrAddComponent<T>(this Component component) where T : Component => component.GetComponent<T>() ?? component.gameObject.AddComponent<T>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME=`/usr/libexec/java_home -v $(jenv global 2>/dev/null) 2>/dev/null` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# powerlevel9k theme settings (https://github.com/bhilburn/powerlevel9k) | |
# font mode | |
POWERLEVEL9K_MODE='nerdfont-complete' | |
# light theme? | |
# POWERLEVEL9K_COLOR_SCHEME='light' | |
# datetime format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mechanize' | |
require 'json' | |
# your my softbank login id and password | |
phone = "***********" | |
password = "********" | |
agent = Mechanize.new | |
agent.user_agent_alias = 'iPhone' | |
agent.follow_meta_refresh = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Hanoi { | |
class HanoiTower { | |
static void Main(string[] args) { | |
int height; | |
if (args.Length == 0 || !int.TryParse(args[0], out height)) height = 3; | |
var count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
() { # zcompile if needed | |
local src | |
for src in $@; do | |
([[ ! -e $src.zwc ]] || [[ $src:A -nt $src.zwc ]]) && zcompile $src | |
done | |
} ~/.zshenv ~/.zshrc ~/.zprofile ~/.zlogin ~/.zlogout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zle-pbcopy-buffer(){ echo -n ${(z)BUFFER} | pbcopy } | |
zle -N zle-pbcopy-buffer |
NewerOlder