Skip to content

Instantly share code, notes, and snippets.

View ChungTak's full-sized avatar
🎯
Focusing

ChungTak ChungTak

🎯
Focusing
View GitHub Profile
@ChungTak
ChungTak / leaflet-big-image-full.html
Created October 13, 2020 09:10 — forked from longhotsummer/leaflet-big-image-full.html
Full example of using leaflet to pan and zoom a big image, as described at http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
<html>
<!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html -->
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script>
<style>
#image-map {
width: 100%;
height: 300px;
border: 1px solid #ccc;
margin-bottom: 10px;
@ChungTak
ChungTak / drachtio.log
Created June 19, 2019 01:57
drachtio-sip-message.log
2019-06-19 09:51:16.713740 Starting drachtio version v0.8.2-1-ga65722f
2019-06-19 09:51:16.713918 Logging threshold: 5
2019-06-19 09:51:16.713961 DrachtioController::run: Main thread id: 140338025555776
2019-06-19 09:51:16.714001 DrachtioController::run listening for applications on tcp port 9022 and tls port 0
2019-06-19 09:51:16.714306 ClientController::ClientController done setting tls options:
2019-06-19 09:51:16.714332 Client controller thread id: 140338025555776
2019-06-19 09:51:16.714447 ClientController::start_accept_tcp
2019-06-19 09:51:16.714499 Prometheus support disabled
2019-06-19 09:51:16.714531 Client controller thread id: 140337920739072
2019-06-19 09:51:16.714590 ClientController::threadFunc - ClientController: io_context run loop started (or restarted)
@ChungTak
ChungTak / gEncodeH264WithPreviews.sh
Created November 26, 2016 11:56 — forked from jetsonhacks/gEncodeH264WithPreviews.sh
Using Gstreamer, take a h264 stream from a Logitech c920, preview it on the display and save it to a file along with the webcam audio.
#!/bin/sh
# Preview and save webcam video on NVIDIA Jetson TK1
# Grab audio and video (in h264 format) from Logitech c920 @ 1920x1080
# Preview @ 1280x720 on screen
# Store video to file named gEncode1080p.mp4
# Logitech c920 is video1 on this machine
VELEM="v4l2src device=/dev/video1 do-timestamp=true"
# Video capability from the camera - get h264 1920x1080
VCAPS="video/x-h264, width=1920, height=1080, framerate=30/1"
@ChungTak
ChungTak / Ubuntu-core-install-guide.md
Created September 20, 2016 07:26 — forked from kice/Ubuntu-core-install-guide.md
Ubuntu core install guide(CN)

准备

使用下载Ubuntu Desktop ISO镜像(32位64位都可以)。 用光驱启动,选择试用Ubuntu。

下载ubuntu-core

访问:http://cdimage.ubuntu.com/ubuntu-core/releases/找到所需要的镜像文件。

使用Ubuntu LiveCD,下载所需镜像到home目录

@ChungTak
ChungTak / autopgsqlbackup
Created September 5, 2016 06:43 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <[email protected]>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@ChungTak
ChungTak / nginxproxy.md
Created December 28, 2015 15:31 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ChungTak
ChungTak / README.md
Created December 28, 2015 15:09 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default and default-ssl to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/