This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell process "Control Center" | |
if not (exists (group of window "Control Center")) then | |
click menu bar item "Now Playing" of menu bar 1 | |
end if | |
if exists (button "play" of group of window "Control Center") then | |
click button "play" of group of window "Control Center" | |
else | |
click button "pause" of group of window "Control Center" | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.nuke '!git clean -f && git restore .' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gchk() { | |
if [[ $1 == "-h" ]]; then | |
echo "\nThis function will checkout the branch or prompt the user to create the branch of it does not exist" | |
return | |
fi | |
if [[ $1 == "-b" ]]; then | |
git checkout -b ${2} | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Why: reduce lines by grouping related styles (flexbox, background, etc) | |
// Creates short powerful style mixins see https://gist.github.com/hawkeye126/8328945e412fda9617d9a6a165632dd3 | |
@mixin dynamicMixin($mixin-args: ()){ | |
@each $rule, $value in $mixin-args { | |
#{$rule}: #{$value}; | |
} | |
} | |
// use directly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin flex($flex-styles: ()) { | |
display: flex; | |
@each $flex-rule, $flex-value in $flex-styles { | |
#{$flex-rule}: #{$flex-value}; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf "\n\n Pre Update Work \n\n"; | |
printf "Remove Mod Pagespeed"; | |
# disable the working symlinked stuffs | |
a2dismod pagespeed; | |
service apache2 restart; | |
# turn off | |
mv /etc/apache2/mods-available/pagespeed.conf /etc/apache2/mods-available/pagespeed.conf.on | |
mv /etc/apache2/mods-available/pagespeed.conf.off /etc/apache2/mods-available/pagespeed.conf | |
# remove cloudflare apache module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'login_init', function(){$_POST['rememberme'] = 'remember';}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>Our goal is simple – to be the leading destination of high-quality, personal defense video content online and a no-nonsense gathering place for those serious about arming themselves for defense in every aspect of their lives.</h3> | |
<h2>The Beginning</h2> | |
<p>We found there was a need for high-quality personal defense instructional videos, so we searched out the top instructors in the field and produced the Personal Firearm Defense DVD Series. We partnered with Rob Pincus, a personal defense industry leader and owner of I.C.E. Training, to provide instruction on our DVDs as well as act as executive director for <a href="http://www.PersonalDefenseNetwork.com/" target="_blank">PersonalDefenseNetwork.com</a>.</p> | |
<h2>Who We Are</h2> | |
<p>Personal Defense Network (PDN) brings together the insight and training expertise of the best instructors in the industry, and has become the go-to resource for conscientious civilians, law enforcement personnel and military operators interested in defending every aspect of t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// register setting | |
function ma_theme_init() { | |
register_setting( 'ma-settings-group', 'ma_show_setting' ); | |
add_settings_section( 'ma_setting_section', 'MA Settings:', 'ma_setting_section_callback', 'wpsettings' ); | |
add_settings_field( 'ma_setting_checkbox', 'CheckBox', 'ma_setting_checkbox_callback', 'wpsettings', $section = 'ma_setting_section'); | |
} | |
add_action('admin_init', 'ma_theme_init'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BTICK='`' | |
EXPECTED_ARGS=3 | |
E_BADARGS=65 | |
MYSQL=`which mysql` | |
Q1="CREATE DATABASE IF NOT EXISTS ${BTICK}$1${BTICK};" | |
Q2="GRANT ALL ON ${BTICK}$1${BTICK}.* TO '$2'@'localhost' IDENTIFIED BY '$3';" | |
Q3="FLUSH PRIVILEGES;" |
NewerOlder