Warning Still under development
iptables --flush # Flush all the rules in filter and nat tables
iptables --table nat --flush
iptables --delete-chain| apiVersion: v1 | |
| data: | |
| datasource.yaml: | | |
| apiVersion: 1 | |
| datasources: | |
| - name: mimir | |
| uid: cdgqpakkxq2gwd | |
| type: prometheus | |
| url: http://grafana-mimir-service:9090/prometheus | |
| isDefault: true |
| /* Mongo.js*/ | |
| var MongoClient = require('mongodb').MongoClient; | |
| var url = "mongodb://localhost:27017/yourdatabasename"; | |
| var assert = require('assert'); | |
| var connection=[]; | |
| // Create the database connection | |
| establishConnection = function(callback){ | |
| from tkinter import ttk | |
| import tkinter as tk | |
| import functools | |
| fp = functools.partial | |
| class VerticalScrolledFrame(ttk.Frame): | |
| """ | |
| A pure Tkinter scrollable frame that actually works! | |
| * Use the 'interior' attribute to place widgets inside the scrollable frame | |
| * Construct and pack/place/grid normally |
| """ Simple IPC benchmark test | |
| Test throughput of 512 KB messages sent between two python processes using: | |
| - multiprocessing pipe | |
| - zeroMQ PUSH/PULL | |
| - zeroMQ DEALER/DEALER | |
| Result: |
| class ThreadSafeSignal(QtCore.QObject): | |
| signal = QtCore.pyqtSignal(object) | |
| def __init__(self, parent=None): | |
| # initialise in Qt thread | |
| super(QtCore.QObject, self).__init__(parent) | |
| self.queue = deque() | |
| self.rsock, self.wsock = socket.socketpair() | |
| self.notifier = QtCore.QSocketNotifier( | |
| self.rsock.fileno(), QtCore.QSocketNotifier.Read) | |
| self.notifier.activated.connect(self.recv) |
| # Code moved to http://github.com/phn/angles. |
| import tkinter as tk | |
| from tkinter.scrolledtext import ScrolledText | |
| import io, hashlib, queue, sys, time, threading, traceback | |
| import code | |
| class Pipe: | |
| """mock stdin stdout or stderr""" |
| REM Delete eval folder with licence key and options.xml which contains a reference to it | |
| for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do ( | |
| for /d %%a in ("%USERPROFILE%\.%%I*") do ( | |
| rd /s /q "%%a/config/eval" | |
| del /q "%%a\config\options\other.xml" | |
| ) | |
| ) | |
| REM Delete registry key and jetbrains folder (not sure if needet but however) | |
| rmdir /s /q "%APPDATA%\JetBrains" |
| gvim() { | |
| local args rawargs path base usegvim=1 noopt= | |
| declare -a args | |
| rawargs=("$@") | |
| while (($#)); do | |
| case "$noopt$1" in | |
| -[cSdirsTuUwW]|--cmd|--remote-expr|--remote-send|--servername|--version) | |
| args[${#args[@]}]="$1" | |
| rawargs[${#args[@]}]="$1" | |
| shift |