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
events { | |
worker_connections 500; | |
# multi_accept on; | |
} | |
http { | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; |
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
#!/bin/bash | |
if [[ ! -f /tmp/.ipinfolastrequest ]] || [[ $(date +%s) > $(cat /tmp/.ipinfolastrequest) ]]; then | |
$(curl --silent http://ip-api.com/json -o /tmp/.ip-api.json) | |
$(echo $(date +%s --date '5 seconds') >| /tmp/.ipinfolastrequest) | |
fi | |
if [[ $1 != '--help' ]] && [[ ! -z $1 ]]; then | |
Result=$(cat /tmp/.ip-api.json | jq -r .$1) | |
if [[ $Result = "null" ]]; then | |
echo "command not found" && exit | |
fi |
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
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
set_color green --bold | |
echo -n 'Ξ ' | |
# PWD | |
set_color cyan --bold | |
set fullpath (pwd) | |
if echo $fullpath | grep -q ^/home/ |
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 php | |
<?php | |
error_reporting(0); | |
$languages = [ | |
"af" => "Afrikaans", | |
"sq" => "Albanian", | |
"am" => "Amharic", | |
"ar" => "Arabic", | |
"hy" => "Armenian", | |
"az" => "Azerbaijani", |