Skip to content

Instantly share code, notes, and snippets.

View peter279k's full-sized avatar
🎯
Focusing

Chun-Sheng, Li peter279k

🎯
Focusing
View GitHub Profile

Sessions

11:20 Track E TICC 101C

用 Serverless 真的方便又省錢?

12:00 Track E TICC 101C

OpenStack 私有雲大規模佈署與維運之實務經驗技術分享

13:30 Track E TICC 102

容器化微服務應用於企業整合架構之發展

@peter279k
peter279k / import_ca_cert_ubuntu.sh
Last active October 19, 2020 09:35
This is importing certificate in Ubuntu 18.04 & 16.04
#!/bin/bash
# Reference: https://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate
sudo_prefix=""
if [[ ${USER} != 'root' ]]; then
sudo_prefix="sudo "
fi;
<?php
require_once './vendor/autoload.php';
use GuzzleHttp\Client;
$voteUrl = 'https://udn.com/func/vote/?act_code=v855';
$client = new Client(['cookies' => true,
'proxy' => ['http://85.173.165.36:46330'],
@peter279k
peter279k / udn_voting.php
Last active August 8, 2020 15:03
UDN Voting for funny.
<?php
require_once './vendor/autoload.php';
use GuzzleHttp\Client;
$voteUrl = 'https://udn.com/func/vote/?act_code=v853';
$client = new Client(['cookies' => true]);
@peter279k
peter279k / read-only-access.sql
Last active August 5, 2020 08:43
This is the SQL script to create read-only access user account on PostgreSQL database
-- References
-- https://serverfault.com/questions/60508/grant-select-to-all-tables-in-postgresql
-- https://blog.redash.io/postgres-readonly/
-- Create a read-only role
CREATE ROLE myapp_readonly_role_name;
GRANT CONNECT ON DATABASE db_name TO myapp_readonly_role_name;
GRANT USAGE ON SCHEMA schema_name TO myapp_readonly_role_name;