Skip to content

Instantly share code, notes, and snippets.

View jat001's full-sized avatar

Jat jat001

View GitHub Profile
@jat001
jat001 / verification.js
Last active January 4, 2016 15:19
Two-step verification for WordPress.
var $ = jQuery;
var host = '.' + location.host;
$(document).ready(function() {
$.removeCookie('wait', {path: '/', domain: host});
});
$('#content #respond #comment').focus(function() {
if (!$.cookie('wait')) {
var timestamp = Math.round($.now()/1000);
$.getJSON('/', {'action': 'verifycode', 'timestamp': timestamp}, function(json) {
var id = '#content #respond #submit';
@jat001
jat001 / daemon.vbs
Last active December 8, 2021 20:47
shadowsocks local daemon on Windows.
Set ws = CreateObject("Wscript.Shell")
ws.run "C:\Users\Jat\AppData\Local\shadowsocks\run.cmd " & WScript.Arguments(0), vbhide
@jat001
jat001 / base16-monokai.soda-dark.tmTheme
Created November 11, 2013 14:42
Base16 Monokai Color Scheme for Theme Soda Dark.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>Wimer Hazenberg (http://www.monokai.nl)</string>
<key>name</key>
<string>Base16 Monokai Dark</string>
<key>semanticClass</key>
<string>base16.monokai.dark</string>
@jat001
jat001 / denySpamIP.php
Last active February 19, 2020 10:26
Deny the IP address of WordPress spam comment.
<?php
// mysql
$host = 'localhost';
$port = '3306';
$user = 'root';
$passwd = '';
$dbname = 'wordpress';
$server = "$host:$port";
// nginx config file