Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

mofelee

🎯
Focusing
Block or report user

Report or block mofelee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ZAYDEK
ZAYDEK / bookmark.min.js
Last active Oct 12, 2019
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
View bookmark.min.js
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@sandcastle
sandcastle / redirect-ingress.yml
Created Aug 27, 2017
An example of a ingress redirect using kubernetes and nginx `configuration-snippet`
View redirect-ingress.yml
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: redirect-ingress
annotations:
ingress.kubernetes.io/configuration-snippet: |
if ($host ~ ^(.+)\.somedomain\.io$) {
return 301 https://$1.domain.io$request_uri;
}
spec:
@ffledgling
ffledgling / k8s-create-deployment.go
Created Jul 12, 2017
kubernetes client-go example: Create a Deployment based on json
View k8s-create-deployment.go
package main
import (
"encoding/json"
"log"
"os"
// We use pretty instead of the common go-spew or pretty-printing because,
// go-spew is vendored in client-go and causes problems
"github.com/kr/pretty"
@CHEF-KOCH
CHEF-KOCH / product.ini
Created Apr 25, 2017
Windows 10 product.ini
View product.ini
[cmi]
namespace=urn:schemas-microsoft-com:unattend
ClientServerSplit=true
AnswerFileFormat=1
ServerDatacenterACorCore=P7CCN-72DMB-93C9B-C9PD7-379HK
EnterpriseNEval=MNXKQ-WY2CT-JWBJ2-T68TQ-YBH2V
ProfessionalSingleLanguage=G3KNM-CHG6T-R36X3-9QDG6-8M8K9
CoreSingleLanguage=BT79Q-G7N6G-PGBYW-4YWX6-6F4BT
Professional=VK7JG-NPHTM-C97JM-9MPGT-3V66T
ServerStorageStandard=VN8D3-PR82H-DB6BJ-J9P4M-92F6J
@iffy
iffy / .gitignore
Last active Oct 14, 2019
Example using electron-updater with `generic` provider.
View .gitignore
node_modules
dist/
yarn.lock
wwwroot
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active Oct 12, 2019
FFmpeg cheat sheet for 360 video
View ffmpeg-cheatsheet.md

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@mgoodness
mgoodness / helm-rbac.md
Last active Jun 8, 2019
Helm RBAC setup for K8s v1.6+ (tested on minikube)
View helm-rbac.md
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@ar-android
ar-android / Api.java
Created Nov 10, 2016
OkHttp With RxAndroid and RxJava
View Api.java
public static Observable<Response> getData() {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
final OkHttpClient client = new OkHttpClient();
final Request request = new Request.Builder()
.url("https://github.com/ar-android/panfic/raw/master/Panfic/gen/com/ocit/data.json")
.get()
.addHeader("cache-control", "no-cache")
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active Oct 14, 2019
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View redis_cheatsheet.bash
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@svcavallar
svcavallar / rabbitmq_reconnect.go
Created Sep 20, 2016
Golang example to reconnect to RabbitMQ on a connection closed event
View rabbitmq_reconnect.go
package main
import (
"flag"
"github.com/streadway/amqp"
"log"
"time"
)
var amqpUri = flag.String("r", "amqp://guest:guest@127.0.0.1/", "RabbitMQ URI")
You can’t perform that action at this time.