Skip to content

Instantly share code, notes, and snippets.

@time-wcrp
time-wcrp / anonymous.sh
Last active March 4, 2021 04:15
Anonymous for MacOS (Modify: Mac Address & Computer Name)
OUTPUT_MAC_ADDRESS=""
OUTPUT_COMPUTER_NAME=""
function IsExistingInterface() {
OUTPUT=$(echo $(ifconfig $1 2>&1))
if [[ ! "$OUTPUT" == *"does not exist"* ]]; then
true
else
false
<?php
/**
* Version: 3
* Reference: https://devreply.com/questions/show/14
* Date: 2016-08-28
*/
/**
* @return bool
<?php
/**
* Version: 1-
* Reference: https://devreply.com/questions/show/14
* Date: 2016-08-28
*/
?>
@time-wcrp
time-wcrp / boot-shutdown.sh
Created December 22, 2015 03:04
boot-shutdown
#!/bin/bash
# by iiitum
EMAIL=""
function shutdown()
{
EVENT_TIME=$(date +%Y/%m/%d-%H:%M:%S)
ME=`whoami`
SUBJECT="System Shutdown: ${EVENT_TIME}"
#!/bin/bash
# credit: https://gist.github.com/actuallymentor/89b643f03df4776112c4
# credit: https://gist.github.com/macbleser/9136424
WP_OWNER=$1 # &lt;-- wordpress owner
WP_GROUP=$2 # &lt;-- wordpress group
WP_ROOT=$4 # &lt;-- wordpress root directory
WS_GROUP=$3 # &lt;-- webserver group
yes | apt-get install jpegoptim;
@time-wcrp
time-wcrp / dummyimage.php
Last active August 16, 2016 13:43
The dummyimage download files to local
#!/usr/bin/env php
<?php
/*
The MIT License (MIT)
Copyright (c) 2015 iiitum
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@time-wcrp
time-wcrp / install-joomla.bash
Last active December 14, 2015 04:34
install joomla
# Last updated 2015-12-14
JOOMLA_VERSION="3.4.5"
git clone https://github.com/joomla/joomla-cms.git
cd joomla-cms
git checkout tags/${JOOMLA_VERSION}
cd ..
mv joomla-cms/* `pwd`
rm -rf joomla-cms/
@time-wcrp
time-wcrp / install-wordpress-with-plugin.bash
Last active February 3, 2016 06:54
install wordpress
# Last updated 2015-12-14
WORDPRESS_VERSION="4.4.1"
SFTP_VERSION="0.7.1"
git clone https://github.com/WordPress/WordPress.git
cd WordPress
git checkout tags/${WORDPRESS_VERSION}
cd ..
mv WordPress/* `pwd`
rm -rf WordPress/