Skip to content

Instantly share code, notes, and snippets.

View willymwai's full-sized avatar

William Mwai willymwai

View GitHub Profile
@willymwai
willymwai / rke2-commands.md
Created March 3, 2023 10:50 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@willymwai
willymwai / gist:af87bb9d8fec82c8aec971899fccd04a
Created February 23, 2018 09:46 — forked from miohtama/gist:34a83d870a14aa7e580d
Safe evaluation of math expressions in Python, using byte code verifier and eval()
""""
The orignal author: Alexer / #python.fi
"""
import opcode
import dis
import sys
import multiprocessing
@willymwai
willymwai / gist:14d4e14e8662c3c7ff0a5bd041b5308a
Created December 24, 2017 17:56 — forked from guillaumepiot/gist:5583149
DJANGO - Admin custom list filter
class CategoryListFilter(SimpleListFilter):
# USAGE
# In your admin class, pass trhe filter class as tuple for the list_filter attribute:
#
# list_filter = (CategoryListFilter,)
# Human-readable title which will be displayed in the
# right admin sidebar just above the filter options.
@willymwai
willymwai / celery.sh
Created December 19, 2017 14:26 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@willymwai
willymwai / lopmonhoc.js.jsx
Created August 15, 2016 06:44 — forked from revskill10/lopmonhoc.js.jsx
Integrate Datatable with React.js
/** @jsx React.DOM */
var LopMonHoc = React.createClass({
getInitialState: function(){
return {data: []}
},
loadData: function(){
$.ajax({
url: '/daotao/lops',
success: function(data){