set version to 6.0.13
export MONGOMS_VERSION=6.0.13
| # this will pull rebase and accept all remote changes | |
| # bascially override all local changes | |
| git pull --rebase=interactive -s recursive -X theirs | |
| # then, git pull | |
| git pull origin "$(git_current_branch)" |
| ffmpeg -i input.mkv -filter_complex "[0:v]setpts=<1/x>*PTS[v];[0:a]atempo=<x>[a]" -map "[v]" -map "[a]" output.mkv | |
| # example increase tempo to 1.25 | |
| # ffmpeg -i Coba1.mp4 -filter_complex "[0:v]setpts=0.8*PTS[v];[0:a]atempo=1.25[a]" -map "[v]" -map "[a]" Coba1.1.mp4 |
| package main | |
| import ( | |
| "fmt" | |
| "refactoring/videostore" | |
| ) | |
| func main() { | |
| movieA := videostore.Movie{ | |
| Title: "Wiro Sableng", |
set version to 6.0.13
export MONGOMS_VERSION=6.0.13
| type DBTX interface { | |
| ExecContext(context.Context, string, ...interface{}) (sql.Result, error) | |
| PrepareContext(context.Context, string) (*sql.Stmt, error) | |
| QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) | |
| QueryRowContext(context.Context, string, ...interface{}) *sql.Row | |
| } | |
| func DBTxFromGorm(tx *gorm.DB) (DBTX, bool) { | |
| dbtx, ok := tx.Statement.ConnPool.(*sql.Tx) | |
| return dbtx, ok |
| const prismaClient = new PrismaClient({ | |
| log: ['query'] // must enable this to log | |
| }); | |
| // Log slow query with all parameters in place, | |
| // so you can copy pasted it and do EXPLAIN query | |
| prismaClient.$on('query' as any, (e: any) => { | |
| const dur = Number.parseInt(e?.duration); | |
| const maxQueryTime = 100; // in ms | |
| if (dur <= maxQueryTime) return; |
| # add your ssh public key to github & gitlab | |
| # set GOPRIVATE, for github & gitlab | |
| GOPRIVATE="gitlab.com/<your-private-group>,github.com/<your-private-group>" | |
| # if you use a private hosted gitlab | |
| GOPRIVATE="gitlab.yoursite.com" | |
| # set github to use ssh | |
| git config --global url."git@github.com:".insteadOf "https://github.com/" |
| package cryptor | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/hex" | |
| "fmt" | |
| "io" | |
| ) |
| javascript:(function() {function copyToClipboard(text) { if (window.clipboardData && window.clipboardData.setData) { /*IE specific code path to prevent textarea being shown while dialog is visible.*/ return clipboardData.setData("Text", text); } else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { var textarea = document.createElement("textarea"); textarea.textContent = text; textarea.style.position = "fixed"; /* Prevent scrolling to bottom of page in MS Edge.*/ document.body.appendChild(textarea); textarea.select(); try { return document.execCommand("copy"); /* Security exception may be thrown by some browsers.*/ } catch (ex) { console.warn("Copy to clipboard failed.", ex); return false; } finally { document.body.removeChild(textarea); } }}var markdown = '[' + document.title + '](' + window.location.href + ')';var selection = window.getSelection( |
| FROM nginx:alpine | |
| COPY ./build /usr/share/nginx/html | |
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |
| EXPOSE 80 | |
| CMD ["nginx", "-g", "daemon off;"] |