Skip to content

Instantly share code, notes, and snippets.

@eimg
eimg / minimal-react-build.md
Last active May 12, 2024 10:05
The Most Minimal React Build System

The Most Minimal React Build System

ပြီးခဲ့တဲ့ ပို့စ်မှာ React ကို ချဉ်းကပ်ပုံအသစ်နဲ့ ဖော်ပြခဲ့ပါတယ်။ ဘာ Build System မှ မပါပဲ HTML Document တစ်ခုအတွင်းမှာ တိုက်ရိုက်ရေးသားခဲ့ခြင်းဖြစ်ပါတယ်။ ဒီတစ်ခါတော့ အရိုးဆုံးနဲ့ အရှင်းဆုံး Build System တစ်ခုကို တည်ဆောက် ကြည့်ကြမှာဖြစ်ပါတယ်။ ဒီအကြောင်းအရာဟာ ကျွန်တော်ပို့ချနေတဲ့ Rockstar Developer Course မှာ ထည့်သွင်းသင်ကြားမယ့် အကြောင်းအရာ တစ်ခုပါ။ ကြိုစမ်းမထားပဲ လက်တမ်းသင်ရင် အမှားပါပြီး အချိန်ကြာမှာစိုးလို့ အခုလို ကြိုစမ်းပြီး စာအဖြစ် ကြိုရေးထားလိုက်တာပါ။ ဒီ Course မှာ တက်ရောက် သင်ယူနေသူ ဟုတ်ဟုတ် မဟုတ်ဟုတ် JavaScript နည်းပညာတွေကို စိတ်ဝင်စားသူဆိုရင် ဒီပို့စ်က အသုံးဝင်ပါလိမ့်မယ်။

စာနည်းနည်း ရှည်ပါမယ်။ အချိန်ပေးနိုင်မှ တစ်ခါတည်းဖတ်ပြီး တစ်ခါတည်းလိုက်လုပ်ကြည့်ပါ။ အချိန်မပေးနိုင်သေးရင် Bookmark လုပ်ပြီး သိမ်းထားပြီး အချိန်ရမှ ပြန်ဖတ်ပါ။ တစ်ဝက်တစ်ပျက်ပဲ ဖက်ရင်တော့ အလကားဖြစ်သွားမှာပါပဲ။ လိုက်မလုပ်ရင်လည်း အလကားပါပဲ။ သိသလိုလို မသိသလိုလို ဖြစ်သွားမယ်။ လိုက်လုပ်ကြည့်မှ တစ်ခါတည်း သဘောပေါက်မှာပါ။

Babel in Browser

လက်ရှိ ရိုးရိုး HTML ထဲမှာ ရေးထားတဲ့ နမူနာကို နောက်တစ်ခါ ပြန်

@wmeints
wmeints / ProxyProxyDance.ps1
Last active May 12, 2024 10:03
This script allows you to enable and disable your proxy settings quickly in case you work from two different locations like your home office and a workplace where they require you to use a proxy.
$internetSettings = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings";
# Determines the current state of the proxy
function Get-ProxyState() {
$settings = Get-ItemProperty -Path $internetSettings;
return $settings.ProxyEnable;
}
# Enables the proxy.
# IMPORTANT: Change the defaults to something that is useful to you!
its ok
I set keyboard in paired mod
then in terminal:
$ bluetoothctl
[NEW] Controller 00:02:72:DE:1E:41 debi [default]
[NEW] Device 00:1F:20:EC:A5:DD Logitech Keyboard K480
[NEW] Device 00:1A:7D:55:02:06 BS-55
[NEW] Device A0:8D:16:86:81:C1 CHM-U01
[bluetooth]# connect 00:1F:20:EC:A5:DD
#######
## These results are still open to the public. See
## https://blog.ktz.me/the-best-media-server-cpu-in-the-world/
## for analysis of them.
# https://github.com/ironicbadger/quicksync_calc
# zoidberg - dell 7040 sff pc
CPU TEST FILE BITRATE TIME AVG_FPS AVG_SPEED AVG_WATTS
i5-6600T h264_1080p_cpu ribblehead_1080p_h264 18952 kb/s 116.352s 29.88 1.04x N/A
@benbacardi
benbacardi / gist:227f924ec1d9bedd242b
Last active May 12, 2024 09:55
Django reverse with a querystring
from django.utils.http import urlencode
def reverse_querystring(view, urlconf=None, args=None, kwargs=None, current_app=None, query_kwargs=None):
'''Custom reverse to handle query strings.
Usage:
reverse('app.views.my_view', kwargs={'pk': 123}, query_kwargs={'search': 'Bob'})
'''
base_url = reverse(view, urlconf=urlconf, args=args, kwargs=kwargs, current_app=current_app)
if query_kwargs:
return '{}?{}'.format(base_url, urlencode(query_kwargs))
@MarkWattTech
MarkWattTech / Camera Commands
Last active May 12, 2024 09:54
Full command
Moved Commands to GIST as YouTube is shortening some of them.
3) sudo apt install autoconf automake build-essential pkgconf libtool git libzip-dev libjpeg-dev gettext libmicrohttpd-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev default-libmysqlclient-dev libpq-dev libsqlite3-dev libwebp-dev
4) sudo wget https://github.com/Motion-Project/motion/releases/download/release-4.3.1/pi_buster_motion_4.3.1-1_armhf.deb
Video at : https://youtu.be/QH8fRGRofv4
#EXTM3U
#EXTINF:-1,beINSports-fr1
http://iptv.am000.tv:8000/live/add17/add17/16.ts
#EXTINF:-1,beINSports-fr2
http://iptv.am000.tv:8000/live/add17/add17/17.ts
#EXTINF:-1,BEINSPORTS-FR3
http://iptv.am000.tv:8000/live/add17/add17/566.ts
#EXTINF:-1,Alkas-1
http://iptv.am000.tv:8000/live/add17/add17/73.ts
#EXTINF:-1,Alkas-2
@ruanbekker
ruanbekker / k3d_persistent_volumes.md
Created February 20, 2020 08:53
Persistent Volumes with k3d/k3s

Persistent Volumes with k3d/k3s

With k3d we can mount the host to container path, and with persistent volumes we can set a hostPath for our persistent volumes. With k3d, all the nodes will be using the same volume mapping which maps back to the host.

Create the cluster:

> mkdir -p /tmp/k3dvol
> k3d create --name "k3d-cluster" --volume /tmp/k3dvol:/tmp/k3dvol --publish "80:80" --workers 2
> export KUBECONFIG="$(k3d get-kubeconfig --name='k3d-cluster')"
@diasporx
diasporx / JetBrains products Activation code until 14 October 2024
Last active May 12, 2024 09:46
JetBrains products Activation code until 14 October 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
@ShyamaSankar
ShyamaSankar / python_lists.py
Last active May 12, 2024 09:44
Python lists
# Create an empty list using square brackets.
numbers = []
print(numbers) # Output: []
# Create an empty list using list().
numbers = list()
print(numbers) # Output: []
# Create a list of numbers.
numbers = [1, 2, 3]