Skip to content

Instantly share code, notes, and snippets.

View huuyafwww's full-sized avatar

huuya huuyafwww

  • Tokyo, Japan
  • 18:47 (UTC +09:00)
View GitHub Profile
@huuyafwww
huuyafwww / iterm_settings.sh
Created June 16, 2024 01:39
Switch iTerm profile when connecting to ssh
function set_iterm2_profile() {
local profile="$1"
echo -ne "\033]1337;SetProfile=$profile\a"
}
set_iterm2_profile "Default"
function ssh_color() {
local host="$1"
case "$host" in
@huuyafwww
huuyafwww / .gitconfig
Created June 16, 2024 01:35
my gitconfig
[alias]
# Output the current branch
now = !git rev-parse --abbrev-ref HEAD
# Output the absolute path to the repository
path = !git rev-parse --show-toplevel
# Add all differences
addAll = !git add -A
@huuyafwww
huuyafwww / my_vs_code_key_bindings.json
Created August 16, 2021 13:57
This is a Visual Studio Code configuration file for keyboard binding for me.
[
{
"key": "ctrl+cmd+a",
"command": "extension.codicTranslate"
},
{
"key": "ctrl+cmd+c 2",
"command": "extension.changeCase.camel"
},
{
@huuyafwww
huuyafwww / centos7_initialize_setup.sh
Last active June 26, 2021 15:15
This is a centos7 initialize setup script for my home server
yum update -y \
&& echo "[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/\$basearch/
gpgcheck=0
enabled=1" > /etc/yum.repos.d/nginx.repo \
&& curl -sL https://rpm.nodesource.com/setup_14.x | bash - \
&& curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo \
&& rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg \
&& yum groupinstall -y "Development Tools" \
@huuyafwww
huuyafwww / Material_Customized.json
Created May 23, 2021 02:35
This is mine default iterm profile
{
"Use Non-ASCII Font" : false,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.81066548824310303,
"Blue Component" : 0.99898606538772583,
"Red Component" : 0.43880558013916016
},
{"lastUpload":"2020-12-06T12:11:53.897Z","extensionVersion":"v3.4.3"}
<pre>
<?php
/**
* All of the Arguments do Sanitize
*
* @param string|array $__stringer
* @return string|array
*/
function __h(
<pre>
<?php
$define_names = [
"A" => "a",
"B" => "b",
"C" => "c",
"D" => "d",
"E" => "e",
];
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>StackTrace</title>
</head>
<body>
<script>
window.onerror = function(msg, file, line, col, err) {
google.maps.event.addListener(marker, 'mouseover', function(){
//ここにホバー時の処理を記述する
});
google.maps.event.addListener(marker, 'mouseout', function(){
//ここにホバー解除時の処理を記述する
});
marker.addListener('click',function(){
//マーカーをクリックしたときの処理を記述する