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 python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
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/sh | |
if [[ -n "$1" ]]; then | |
pid=$(ps rax | awk '{print $1, $5}' | grep -i "$1" | cut -d ' ' -f 1) | |
if [[ -n $pid ]]; then | |
caffeinate -s -w "$pid" & | |
echo "Systemp sleep prevented by $1" | |
else | |
echo "Sorry, the $1 could not be found." | |
fi | |
else |
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
# BetterTouchTool | |
127.0.0.1 bettertouchtool.net | |
127.0.0.1 updates.bettertouchtool.net | |
127.0.0.1 folivora.ai | |
127.0.0.1 updates.boastr.net | |
127.0.0.1 updates.folivora.ai |
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 os | |
import re | |
regex = r"\[(\d+)\]" | |
for f in os.listdir("./"): | |
if f.endswith(".mp4"): | |
matches = re.finditer(regex, f, re.MULTILINE) | |
for num, match in enumerate(matches, start=1): | |
ep = match.group(1) | |
print(r'TV.%s.mp4' % ep) |
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/sh | |
install_v2ray(){ | |
echo "Install v2ray..." | |
if [[ ! -f /usr/bin/v2ray/v2ray ]] | |
then | |
curl -Ls https://install.direct/go.sh | bash | |
fi | |
mkdir -p /etc/v2ray |
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
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"crypto/x509/pkix" | |
"encoding/pem" | |
"fmt" | |
"math/big" |
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
class Python < Formula | |
desc "Interpreted, interactive, object-oriented programming language" | |
homepage "https://www.python.org/" | |
url "https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz" | |
sha256 "35446241e995773b1bed7d196f4b624dadcadc8429f26282e756b2fb8a351193" | |
revision 1 | |
bottle do | |
sha256 "1bc5a2d3f0a8602bf2f46de7c43fcb6dde4f110c0f4518d4e802cb1f733a43de" => :high_sierra | |
sha256 "131d39120ac6ca2f21bf231de7414c08916cea472bc5219e0bcb49541f77cb9f" => :sierra |
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
dev MTIzNDU2Cg== |
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 | |
PODS=$(kubectl get pods -n alauda-system |grep Running|grep $1|awk '{print $1}') | |
ARGS=${@:2} | |
for POD in $PODS | |
do | |
echo "Exec $ARGS on pod $POD" | |
kubectl exec -it -n alauda-system $POD -c $1 -- ${ARGS[@]} | |
done |
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
find . -type f -name '*.sh' | while read f; do mv "$f" "${f%.sh}"; done |
NewerOlder