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
zstyle ':filter-select' case-insensitive yes
zstyle ':filter-select' extended-search yes
zstyle ':filter-select' hist-find-no-dups yes
zstyle ':filter-select' rotate-list yes
bindkey '^z1' zaw-git-branches
bindkey '^z2' zaw-git-files
bindkey '^z3' zaw-git-files-legacy
bindkey '^z4' zaw-git-log
bindkey '^z5' zaw-git-recent-all-branches
type op &>/dev/null && {
eval "$(op completion zsh)" && compdef _op op
[ -f ~/.config/op/plugins.sh ] && source ~/.config/op/plugins.sh
# enable auto-completion through op plugins
local plugins=($(\ls -1 ~/.config/op/plugins/used_items | sed 's/.[^.]*$//'))
for plugin in $plugins; do
eval "
function _${plugin}_wrapped() {
op plugin run -- $plugin \$@
# 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;