Skip to content

Instantly share code, notes, and snippets.

View wahyd4's full-sized avatar

Junwei Zhao wahyd4

View GitHub Profile
#EXTINF:-1 tvg-id="27" tvg-name="" tvg-logo="http://live.cooltv.top/logo/hunanweishi.png" group-title="卫视",湖南卫视
http://live.cooltv.top/tv/aishang.php?id=hunwshd
#EXTINF:-1 tvg-id="28" tvg-name="" tvg-logo="http://live.cooltv.top/logo/zhejiangweishi.png" group-title="卫视",浙江卫视
http://live.cooltv.top/tv/aishang.php?id=zjwshd
#EXTINF:-1 tvg-id="31" tvg-name="" tvg-logo="http://live.cooltv.top/logo/dfws.png" group-title="卫视",东方卫视
http://live.cooltv.top/tv/aishang.php?id=dfwshd
#EXTINF:-1 tvg-id="29" tvg-name="" tvg-logo="http://live.cooltv.top/logo/jsws.png" group-title="卫视",江苏卫视
http://live.cooltv.top/tv/aishang.php?id=jswshd
#EXTINF:-1 tvg-id="30" tvg-name="" tvg-logo="http://live.cooltv.top/logo/btv.png" group-title="卫视",北京卫视
http://live.cooltv.top/tv/aishang.php?id=bjwshd
@wahyd4
wahyd4 / kubernetes_add_service_account_kubeconfig.sh
Created May 3, 2020 12:09 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@wahyd4
wahyd4 / oz-lotto-multiple-goroutine
Created April 23, 2019 04:49
oz-lotto-multiple-goroutine
package main
import (
"flag"
"fmt"
"math/rand"
"sort"
"sync"
"time"
)
@wahyd4
wahyd4 / main.go
Created April 23, 2019 04:07
oz-lott demo
package main
import (
"flag"
"fmt"
"math/rand"
"sort"
"time"
)
@wahyd4
wahyd4 / helm.sh
Created October 2, 2018 07:12
Kubernetes service account for Helm
# Create service account in Kubernetes
kubectl -n dex-dev create serviceaccount tiller
serviceaccount "tiller" created
$ kubectl -n dex-dev create rolebinding tiller --clusterrole admin --serviceaccount dex-dev:tiller
rolebinding "tiller" created
$ helm init --service-account=tiller --tiller-namespace=dex-dev
...
@wahyd4
wahyd4 / cisco-anyconnect-profile.md
Created June 16, 2017 02:29 — forked from JosefJezek/cisco-anyconnect-profile.md
Cisco AnyConnect VPN Profile

Cisco AnyConnect VPN Profile

Router IOS

webvpn import svc profile profile-example usbflash0:example.xml
webvpn context ctx-example
policy group vpn-group-example
svc profile profile-example
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def facebook
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
if @user.persisted?
flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Facebook"
sign_in_and_redirect @user, :event => :authentication
else
session["devise.facebook_data"] = request.env["omniauth.auth"]
redirect_to new_user_registration_url