Skip to content

Instantly share code, notes, and snippets.

@karthik101
karthik101 / Creating admin user in kubernetes dashboard.md
Last active May 7, 2024 20:19
Creating admin user in kubernetes dashboard

In this guide, we will find out how to create a new user using Service Account mechanism of Kubernetes, grant this user admin permissions and log in to Dashboard using bearer token tied to this user.

Create Service Account

We are creating Service Account with name my-admin-user in namespace kube-system first.

kubectl create serviceaccount my-admin-user -n kube-system
kubectl get sa
@lopspower
lopspower / README.md
Last active May 7, 2024 20:19
All Android Directory Path

All Android Directory Path

Twitter

1) System directories

⚠️ We can't write to these folers

Method Result
@peterm790
peterm790 / GEFS_Kerchunk.ipynb
Created October 28, 2022 13:53
GEFS Kerchunk
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SunDi3yansyah
SunDi3yansyah / index.html
Created September 26, 2015 23:56
Default Index file on Apache2 {/var/www/html/index.html}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Modified from the Debian original for Ubuntu
Last updated: 2014-03-19
See: https://launchpad.net/bugs/1288690
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@fnky
fnky / ANSI.md
Last active May 7, 2024 20:16
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ali1234
ali1234 / clock.py
Created March 2, 2018 14:54
scroll phat hd clock
#!/usr/bin/env python
import time
import signal
import math
import scrollphathd
from envirophat import light, motion, weather
"""
@dhh
dhh / linux-setup.sh
Last active May 7, 2024 20:14
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@kitschpatrol
kitschpatrol / apple-photos-export.applescript
Last active May 7, 2024 20:09
AppleScript to automate image export from Apple Photos
-- Export images from Photos via automated GUI manipulation
-- It's an unsavory approach, but no other means of automation seems to yield higher quality edited image exports (so far)
-- Arguments are passed in their order of appearance in the GUI, and expect values exactly matching the UI strings in Photos.app
-- Accepts an individual photo UUID, or an album UUID (use osxphotos query to look up UUIDs)
on run { uuid, exportDirectory, photoKind, jpegQuality, tiffBitDepth, colorProfile, photoSize, maxSizeType, maxSizeValue, includeMetadata, includeLocation , fileName, sequentialPrefix, subfolderFormat}
tell application "System Events"
set wasRunning to (name of processes) contains "Photos"
end tell
@primaryobjects
primaryobjects / hotspot-keep-alive.ps1
Last active May 7, 2024 20:07
Script to Enable Windows 10 Mobile Hotspot Automatically After Reboot
# https://superuser.com/a/1434648
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
$netTask.Result
@bmaupin
bmaupin / free-database-hosting.md
Last active May 7, 2024 20:03
Free database hosting