Skip to content

Instantly share code, notes, and snippets.

View GeneralD's full-sized avatar
💭
Alcohol makes better code 🥃

YUMENOSUKE GeneralD

💭
Alcohol makes better code 🥃
View GitHub Profile
# 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
import Foundation
import UIKit
@IBDesignable class __CustomView__: UIView {
@IBInspectable var labelText: String = "" {
didSet {
label.text = labelText
}
}
// ==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
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>();
}
export JAVA_HOME=`/usr/libexec/java_home -v $(jenv global 2>/dev/null) 2>/dev/null`
#!/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
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
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;
@GeneralD
GeneralD / .zshrc
Last active September 6, 2018 12:13
必要なファイルのみzcompileする ref: https://qiita.com/GeneralD/items/73e31ab8cf9aa01e480f
() { # 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
zle-pbcopy-buffer(){ echo -n ${(z)BUFFER} | pbcopy }
zle -N zle-pbcopy-buffer