Skip to content

Instantly share code, notes, and snippets.

@mrkeng
mrkeng / python request module
Created April 23, 2020 05:49
GIST created by python code
Python requests has 3 parameters: 1)Request URL
2)Header Fields
3)Parameter
4)Request body
@mrkeng
mrkeng / gist:cf8ad70f3834f41c5c574c45f90514ca
Created August 11, 2017 07:47 — forked from djs070/gist:4570480
Install NVM & Node 0.8.17 on Fedora/CentOS
# install git
yum install git -y
# get nvm
git clone git://github.com/creationix/nvm.git ~/nvm
# activate nvm
@mrkeng
mrkeng / dns.py
Created August 9, 2017 11:55 — forked from cybercase/dns.py
Simple (and limited) DNS query client
#!/usr/bin/env python
# -*- coding:utf8 -*-
import random
import socket
import struct
import StringIO
import argparse
from collections import namedtuple
MAX_PACKET_SIZE = 512
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="__UP_title__" directory_title="Comments"
scrolling="true"
height="400"
width="100%"
title_url="__UP_titleurl__"
/>
<UserPref name="title" display_name="title" datatype="string" required="false" default_value="Comments" />
<UserPref name="URL" display_name="Your Page URL (URL for the page where this Gadget is placed)" required="true" default_value=""/>
@mrkeng
mrkeng / whoamung
Last active December 29, 2015 08:22
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Custom Gadget" />
<Content type="html"><![CDATA[
<div align ="right" style="padding: 5px 0px 0px 0px;" >
<img border="0" src="http://whos.amung.us/pswidget/x01l/" alt="wau" height="15" />
<div style="overflow: hidden; height: 1px; width: 1px;">
<img border="0" width="80" src="http://whos.amung.us/pswidget/9jra/" height="15" alt="wau" />
</div>
@mrkeng
mrkeng / docker_1.9_on_ubuntu_14.04.md
Created October 27, 2015 05:22 — forked from ochinchina/docker_1.9_on_ubuntu_14.04.md
install the docker 1.9-dev to ubuntu 14.04

###add patch

get the script from https://get.docker.com/ubuntu/, the script is:

# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
	apt-get update
	apt-get install -y apt-transport-https
fi
@mrkeng
mrkeng / index-with-redis.php
Last active August 29, 2015 14:26 — forked from JimWestergren/index-with-redis.php
Redis as a Frontend Cache for WordPress
<?php
/*
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/
@mrkeng
mrkeng / my.cnf
Last active August 29, 2015 14:25
my.cnf for galera
[mysqld]
### mysql general option
bind-address = 0.0.0.0
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
#!/bin/bash
# Created Fri Mar 21 2014
# This is a fork of https://gist.github.com/SeonghoonKim/4378896
# This script will download, install and start
# the following items on CentOS 6.5:
# MongoDB
# OpenJDK 1.7.0
# ElasticSearch 0.90.1
# Graylog2 server 0.20.1
# Graylog2 web interface 0.20.1
#!/bin/bash
# Autor: Nilton OS -- www.linuxpro.com.br
echo 'setup-web2py-nginx-uwsgi-centos64.sh'
echo 'Support CentOS 6.4'
echo 'Installs Nginx 1.4.1 + uWSGI + Web2py'
# Get Web2py Admin Password
echo -e "Web2py Admin Password: \c "
read PW