Skip to content

Instantly share code, notes, and snippets.

View priesdelly's full-sized avatar
🏠
Working from home

Priesdelly priesdelly

🏠
Working from home
  • Bangkok, Thailand
View GitHub Profile
@priesdelly
priesdelly / SampleSingleton.php
Created February 24, 2019 10:31
Example custom singleton on php
class SampleSingleton
{
private static $_instance = null;
private function __construct()
{
}
public function getInstance()
{
@priesdelly
priesdelly / AppBarcode1.cs
Last active February 24, 2019 10:34
Example create barcode on .NET Framework
using Spire.Barcode;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@priesdelly
priesdelly / http.go
Created April 4, 2019 03:52
Check url http status from url.txt
package main
import (
"bufio"
"fmt"
"log"
"net/http"
"os"
"strconv"
)
@priesdelly
priesdelly / listfilename.go
Last active September 3, 2020 02:18
List filename and write to text file
package main
import (
"fmt"
"os"
"path/filepath"
"sort"
)
func main() {
@priesdelly
priesdelly / gist:d09450a9be8ac22e4bd35992600b36b0
Created November 6, 2020 06:14
Niceoppai_read_all_page (old and deprecated)
// ==UserScript==
// @name Niceoppai_read_all_page
// @namespace local
// @version 0.2
// @description Redirect from read 1 page to read all page manga
// @author Priesdelly
// @match http*://www.niceoppai.net/*
// @grant none
// @run-at document-start
// ==/UserScript==
package main
import (
"fmt"
"net/http"
"crypto/tls"
)
func main() {
tr := &http.Transport{
package main
import (
"fmt"
"net/http"
"crypto/tls"
)
func main() {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
adduser robert
usermod -aG sudo robert
ufw app list
ufw allow OpenSSH
ufw enable
ufw status
upstream upstream-service {
server spring-sv1.prod:8000;
}
server {
listen 80;
# listen [::]:80;
server_name _;
location / {