Skip to content

Instantly share code, notes, and snippets.

View tkt028's full-sized avatar

Khon tkt028

  • home
  • Vietnam
View GitHub Profile
#!/bin/bash
# variables
LOGFILE="/var/log/nginx/access.log"
LOGFILE_GZ="/var/log/nginx/access.log.*"
RESPONSE_CODE="200"
# functions
filters(){
grep $RESPONSE_CODE \
@tkt028
tkt028 / resize-image-in-github-issue-github-flavored-markdown.md
Created November 11, 2022 11:06 — forked from stevecondylios/resize-image-in-github-issue-github-flavored-markdown.md
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

Arq stores backup data in a format similar to that of the open-source version
control system 'git'.
Content-Addressable Storage
---------------------------
At the most basic level, Arq stores "blobs" using the SHA1 hash of the
contents as the name, much like git. Because of this, each unique blob is only
stored once. If 2 files on your system have the same contents, only 1 copy of
the contents will be stored. If the contents of a file change, the SHA1 hash is
different and the file is stored as a different blob.
@tkt028
tkt028 / DevonThink Search operators
Created March 28, 2022 15:13 — forked from florido/DevonThink Search operators
DevonThink Search operators
DevonThink Search operators
In the toolbar search field, as well as in both the interactive and the simple web interface, you can use standard and extended Boolean operators, parenthesis, and more to fine tune your search.
The syntax of the operators is compatible to DEVONagent and EasyFind, the Finder, Spotlight, common search engines as well as common programming languages such as C, C++, Objective-C, Java, and JavaScript. The complexity of the query is unlimited.
Case
All terms are case-insensitive. You may, if you wish, use capitalization for proper names in a query, but DEVONthink Pro Office will ignore case in interpreting the query.
@tkt028
tkt028 / 01. Download Locations for FFmpeg.md
Created January 23, 2022 05:05 — forked from AbsoluteDestiny/01. Download Locations for FFmpeg.md
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@tkt028
tkt028 / ffmpeg-commands.sh
Created January 23, 2022 05:02 — forked from 44213/ffmpeg-commands.sh
ffmpeg commands.
# To extract the sound from a video and save it as MP3:
ffmpeg -i <video.mp4> -vn <sound>.mp3
# To convert frames from a video or GIF into individual numbered images:
ffmpeg -i <video.mpg|video.gif> <frame_%d.png>
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF:
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif>
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image:
@tkt028
tkt028 / install-rabbitmq-centos-7.md
Created December 8, 2021 03:28 — forked from fernandoaleman/install-rabbitmq-centos-7.md
Install RabbitMQ on CentOS 7

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@tkt028
tkt028 / chrome_tabs.osa
Created June 17, 2021 06:03 — forked from samyk/chrome_tabs.osa
applescript to show all url+titles of Chrome tabs along with front window+tab url+title
# shows all url+titles of Chrome along with front window+tab url+title
set titleString to ""
tell application "Google Chrome"
set window_list to every window # get the windows
repeat with the_window in window_list # for every window
set tab_list to every tab in the_window # get the tabs
repeat with the_tab in tab_list # for every tab
@tkt028
tkt028 / getOpenTabs.sh
Created June 17, 2021 06:03 — forked from NoahCardoza/getOpenTabs.sh
[OSX] Lists the URLs of all the open tabs in a specified browser.
#!/bin/bash
# args: browser
# example: ./getOpenTabs.sh "Brave Browser"
# credits:
# https://gist.github.com/samyk/65c12468686707b388ec43710430a421
# TODO:
# validate args
# don't open app if not already open