Skip to content

Instantly share code, notes, and snippets.

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

Kashif Ahamed realmau5

🏠
Working from home
View GitHub Profile
anonymous
anonymous / script.js
Created January 20, 2017 06:18
Swirling Stars
window.onload = function(){
// Creating the Canvas
var canvas = document.createElement("canvas"),
c = canvas.getContext("2d"),
particles = {},
particleIndex = 0,
particleNum = 0.1;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
@mayeenulislam
mayeenulislam / Default Taxonomy Term for CPT
Last active April 5, 2023 11:07
Make Default taxonomy term for Custom Post Type - WordPress
/**
* Author: Michael Fields
* Source: http://wordpress.mfields.org/2010/set-default-terms-for-your-custom-taxonomies-in-wordpress-3-0/
* Thanks a lot for the nice tweak
*/
/**
* Define default terms for custom taxonomies in WordPress 3.0.1
*
@mheadd
mheadd / monitor.sh
Created May 13, 2013 20:00
Simple bash script to check whether MySQL is running.
#!/bin/bash
UP=$(pgrep mysql | wc -l);
if [ "$UP" -ne 1 ];
then
echo "MySQL is down.";
sudo service mysql start
else
echo "All is well.";
fi