Instantly share code, notes, and snippets.

View README.md

ASUSWRT-MERLIN custom DDNS Script for Cloudflare

for Cloudflare as DDNS

using Cloudflare API v4

Using

put ddns-start at /jffs/scripts/, setting values and set DDNS type to Custom at web Admin panel.

View kibana-nginx-dashboard.json
[
{
"_id": "f0767c10-d29f-11e8-9dcb-a75312df94f7",
"_type": "dashboard",
"_source": {
"title": "NGINX Dashboard",
"hits": 0,
"description": "",
"panelsJSON": "[{\"panelIndex\":\"1\",\"gridData\":{\"x\":0,\"y\":0,\"w\":48,\"h\":15,\"i\":\"1\"},\"embeddableConfig\":{\"mapCenter\":[16.636191878397664,23.73046875],\"mapZoom\":2},\"id\":\"e7241f10-d29e-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"2\",\"gridData\":{\"x\":32,\"y\":15,\"w\":16,\"h\":7,\"i\":\"2\"},\"embeddableConfig\":{},\"id\":\"14e70e80-d29f-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"4\",\"gridData\":{\"x\":23,\"y\":22,\"w\":21,\"h\":12,\"i\":\"4\"},\"embeddableConfig\":{},\"id\":\"5517b450-d29f-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"5\",\"gridData\":{\"x\":0,\"y\":15,\"w\":16,\"h\":7,\"i\":\"5\"},\"embeddableConfig\":{},\"id\":\"78e5a8b0-d29f-11e8-9dcb-a75312df
View notes.txt
dotnet Notes
-------------
1. >dotnet add package Microsoft.EntityFrameworkCore.SqlServer //add package
>dotnet add package Microsoft.EntityFrameworkCore.Tools //add package
>dotnet restore //update csproj
>dotnet ef -h //check if package is installed
>dotnet ef migrations add CreateDatabase //after create class execute this
View test_articles.py
from django.test import TestCase
from rest_framework.test import APIClient
from rest_framework import status
from django.urls import reverse
from .models import Articles
class GetArticlesTests(APITestCase):
''' Class to test get all articles '''
View output_log.txt
Log uploaded on Thursday, October 18, 2018, 2:15:05 PM
Loaded mods:
Core: (no assemblies)
ED-Embrasures: 0Harmony(1.2.0.1), ED-Embrasures(1.0.0.0)
Misc. Robots: AIRobot(0.19.0.0)
Veinminer B19: Veinminer(1.0.0.0)
[SYR] Doormats: SyrDoorMats(1.0.0.0)
[B19] Mass Graves: 0Harmony(1.2.0.1), MassGraves(1.0.0.0)
Expanded Prosthetics and Organ Engineering: (no assemblies)
Increased Stack: (no assemblies)
View StatusIcon.py
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."
View createkeystoresha256.sh
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -sigalg SHA256withRSA -validity 10000 -dname "CN=Android Debug,O=Android,C=US"
View gist:c7c977f28f44caa5e95cdc0cf84511ee
QQ群:575935021,注,本群目前只轉載其他平台翻牆工具!
View OptionalExtension.kt
package com.aracem.android
inline fun <T, K> T?.ifPresent(block: (T) -> K): K? {
return this?.let { block.invoke(this) }
}
inline fun <K> K?.orElse(block: () -> K): K {
return this?.let {
this
} ?: block.invoke()