Skip to content

Instantly share code, notes, and snippets.

View tanatip's full-sized avatar
🏠
Working from home

Tanatip Siriprathum tanatip

🏠
Working from home
View GitHub Profile
@bgallagh3r
bgallagh3r / wp.sh
Last active March 23, 2025 19:40
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@luetkemj
luetkemj / wp-query-ref.php
Last active April 6, 2025 09:15
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@Obsidion
Obsidion / gist:1204800
Created September 8, 2011 21:28
Create bare git repo
---------NO CODE YET--------
on server:
git init --bare
then clone it locally:
git clone git@server:/myNewRepo.git
@ggendre
ggendre / gist:905833
Created April 6, 2011 15:16
javascript : convert a string to XML DOM
//this function convert the string representation of some XML
//into a DOM object.
function StringToXMLDom(string){
var xmlDoc=null;
if (window.DOMParser)
{
parser=new DOMParser();
xmlDoc=parser.parseFromString(string,"text/xml");
}
else // Internet Explorer