Skip to content

Instantly share code, notes, and snippets.

View peter279k's full-sized avatar
🎯
Focusing

Chun-Sheng, Li peter279k

🎯
Focusing
View GitHub Profile
@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;
@peter279k
peter279k / facebook-detect-dec.md
Last active April 24, 2022 18:51
Facebook detect fake accounts with deep entity classification
@peter279k
peter279k / web-server-lists.md
Last active April 15, 2021 02:30
This is the collection for web server lists
$( document ).ready(function() {
console.log( "ready!" );
let line_userid = "";
$('input[name="idtype"]')[0].checked = true; // 預設為身份證字號
liff.init({
liffId: "1552207375-1xDKJLe5"
})