I hereby claim:
- I am faishal on github.
- I am faishal (https://keybase.io/faishal) on keybase.
- I have a public key whose fingerprint is F3B7 DD16 C029 8066 AC92 0164 62E4 69AA 0DF4 86C5
To claim this, I am signing this object:
| add_action( 'template_redirect', 'wpmu_ssl_template_redirect', 1 ); | |
| function wpmu_ssl_template_redirect() { | |
| if ( is_ssl() && ! is_admin() ) { | |
| if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { | |
| wp_redirect( preg_replace( '|^https://|', 'http://', $_SERVER['REQUEST_URI'] ), 301 ); | |
| exit(); | |
| } else { |
| #!/bin/bash | |
| # Copyright © 2016 Faishal Saiyed | |
| cd | |
| timestamp=$(date +%s) | |
| if [ ! -f openssh-7.3.zip ]; then wget https://github.com/faishal/openssh-portable/releases/download/cent.os.6.7.openssh.7.3p1/openssh-7.3.zip; fi; | |
| unzip -o openssh-7.3.zip -d openssh-7.3p1 | |
| cd openssh-7.3p1/ | |
| cp /etc/pam.d/sshd pam-ssh-conf-$timestamp | |
| rpm -U *.rpm | |
| yes | cp pam-ssh-conf-$timestamp /etc/pam.d/sshd |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| for SITE_URL in $(wp site list --fields=domain,path,archived,deleted --format=csv --url=cmsdev.sc.com | grep ",0,0$" | awk -F ',' '{print $1 $2}') | |
| do | |
| echo "Indexing $SITE_URL ..." | |
| echo "--- BEGIN INDEXING $SITE_URL ---" &>> indexing.log | |
| wp elasticpress index --setup --url="$SITE_URL" --show-bulk-errors &>> indexing.log | |
| echo "--- END INDEXING $SITE_URL ---" &>> indexing.log | |
| done |
| #!/bin/bash | |
| # Run from master to avoid not able to delete current branch error | |
| git checkout master --force | |
| git submodule update --init --recursive | |
| # Update our list of remotes | |
| git fetch | |
| git remote prune origin |
| /** | |
| * Add ajaxprefilter to reset the form | |
| */ | |
| function initAjaxPreFilter() { | |
| // Add callback | |
| $( document ).on( 'term:added', function() { | |
| // Do reset form related stuff here | |
| } ); | |
| // Register ajaxprefilter |
| #!/bin/bash | |
| OPTIND=1 | |
| verbose=0 | |
| dbuser="" | |
| dbpasswd="" | |
| while getopts "vh?U:P:H:" opt; do | |
| case "$opt" in |
| #!/bin/bash | |
| for SITE_URL in $(wp site list --fields=domain,path,archived,deleted --format=csv --url=MAIN_DOMAIN | grep ",0,0$" | awk -F ',' '{print $1 $2}') | |
| do | |
| echo "Fixing $SITE_URL ..." | |
| for POSTID in $(wp post list --post_type=CUSTOM_POSTTYPE --field=ID --url="$SITE_URL") | |
| do | |
| wp post meta update ${POSTID} META_KEY NEW_META_VALUE --url="$SITE_URL" | |
| done | |
| done |
| # Solution 1 - Non http | |
| # Directives to send expires headers and turn off 404 error logging. | |
| location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { | |
| expires 24h; | |
| log_not_found off; | |
| try_files $uri $uri/ @production; | |
| } | |
| location @production { | |
| resolver 8.8.8.8; |
| var pipelines = document.getElementsByClassName( 'zhc-pipeline' ); | |
| var line_break = '\n\r'; | |
| var report = ''; | |
| var epics_data = {}; | |
| for ( var i = 0; i < pipelines.length; i ++ ) { | |
| var pipeline = pipelines[i]; | |
| var issues = $( '.zhc-issue-cards__cell', pipeline ); | |
| var status = $( '.zhc-pipeline-header__title', pipeline ).textContent; |