- Intro: https://jwt.io/introduction
- Kelebihan: tidak perlu query lagi, semua informasi terkait user bisa dimasukan di dalam token
- Tools to encode/decode: https://jwt.io/
- PyJWT: https://pyjwt.readthedocs.io/en/stable/usage.html
- Tutorial using PyJWT: https://dev.to/aminu_israel/using-json-web-token-jwt-with-python-3n4p
This file contains hidden or 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
# listen to microphone | |
pactl load-module module-loopback latency_msec=1 | |
# stop listening | |
pactl unload-module module-loopback |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
This is simple example showing how to add auto-complete for your custom javascript object i.e context
.
Open Monaco Editor Playground and paste snippet above into the right panel. Hit run and type context. in the right panel:
auto-complete with list of context
's fields should appear
This file contains hidden or 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
func filterGridParamsPostgre(params *query.GridParams) (state bool, fullQuery string, fullSorter string) { | |
var values []string | |
var query string | |
var sign string | |
var complementArg string | |
var connector string | |
var queries string | |
var fullQueries []string | |
var argument string |
This file contains hidden or 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
func (h *PolicyHandler) listUsersGrid(c echo.Context) error { | |
tenant := c.Param("tenant") | |
id := c.Param("id") | |
gridParams := c.Get("gridParams").(*query.GridParams) | |
policy, err := h.PolicyStorage.GetPolicy(tenant, id) | |
if err != nil { | |
return response.JSONError(c, http.StatusBadRequest, err) | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq.Expressions; | |
using System.Runtime.CompilerServices; | |
namespace BasicListView | |
{ | |
public class BaseViewModel : INotifyPropertyChanged | |
{ |
This file contains hidden or 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
from lxml import html | |
raw = '''<table class="list"> | |
<tr> | |
<th>Date(s)</th> | |
<th>Sport</th> | |
<th>Event</th> | |
<th>Location</th> | |
</tr> | |
<tr> |
This file contains hidden or 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
xml = """<Create> | |
<SubNetwork networkType="GSM" userLabel="BSC"> | |
</SubNetwork> | |
<SubNetwork networkType="WCDMA" userLabel="RNC01"> | |
</SubNetwork> | |
<SubNetwork networkType="IPRAN" userLabel="IPRAN"> | |
</SubNetwork> |
NewerOlder