Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Priesdelly priesdelly

:octocat:
View GitHub Profile
@priesdelly
priesdelly / gist:d09450a9be8ac22e4bd35992600b36b0
Created Nov 6, 2020
Niceoppai_read_all_page (old and deprecated)
View gist:d09450a9be8ac22e4bd35992600b36b0
// ==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==
@priesdelly
priesdelly / listfilename.go
Last active Sep 3, 2020
List filename and write to text file
View listfilename.go
package main
import (
"fmt"
"os"
"path/filepath"
"sort"
)
func main() {
@priesdelly
priesdelly / http.go
Created Apr 4, 2019
Check url http status from url.txt
View http.go
package main
import (
"bufio"
"fmt"
"log"
"net/http"
"os"
"strconv"
)
@priesdelly
priesdelly / AppBarcode1.cs
Last active Feb 24, 2019
Example create barcode on .NET Framework
View AppBarcode1.cs
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 / SampleSingleton.php
Created Feb 24, 2019
Example custom singleton on php
View SampleSingleton.php
class SampleSingleton
{
private static $_instance = null;
private function __construct()
{
}
public function getInstance()
{
@priesdelly
priesdelly / StaticVariable.java
Created Feb 24, 2019
Example static variable
View StaticVariable.java
import java.util.ArrayList;
public class TestStaticVariable {
public static void main(String[] args) {
ArrayList < TestModel > modelLst = new ArrayList < > ();
for (int i = 0; i < 10; i++) {
TestModel model = new TestModel();
@priesdelly
priesdelly / TestModel.java
Last active Feb 24, 2019
Model class for example test in java
View TestModel.java
class TestModel {
private static int value1;
private int value2;
public static int getValue1() {
return value1;
}
public static void setValue1(int value1) {
TestModel.value1 = value1;
@priesdelly
priesdelly / StaticMethod.java
Last active Feb 24, 2019
Example static method
View StaticMethod.java
public class TestStaticMethod{
public static void main(String[] args){
int value = Calculate.bar(10);
System.out.println("value = " + value);
}
}
class Calculate{
public static int bar(int number){
return number+10;
@priesdelly
priesdelly / NonStaticMethod.java
Last active Feb 24, 2019
Example static method
View NonStaticMethod.java
public class TestStaticMethod{
public static void main(String[] args){
Calculate foo = new Calculate();
int value = foo.bar(10);
System.out.println("value = " + value);
}
}
class Calculate{
public int bar(int number){
@priesdelly
priesdelly / ReplaceStringJSNew.js
Created Feb 24, 2019
Replace string in javascript
View ReplaceStringJSNew.js
var strText = 'Test Replace bear and duck and dog and cat';
var strAfRep = strText.replace(/and/g,'or');
console.log(strAfRep);