Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
@abdul
abdul / teamcity.conf
Created September 4, 2016 09:54
Teamcity (with WebSockets) - Nginx with SSL
map $http_upgrade $connection_upgrade {
default upgrade;
'' '';
}
server {
listen 80;
server_name teamcity.local;
rewrite ^ https://$host$request_uri? permanent;
@abdul
abdul / http-check.conf
Created September 16, 2016 17:32
monit http check
## http-check
check program http-check with path "/etc/monit/http-check.sh"
start program = "/etc/init.d/php5-fpm start"
stop program = "/etc/init.d/php5-fpm stop"
if status !=0 then alert
if status !=0 then restart
if 5 restarts within 5 cycles then timeout
@abdul
abdul / run-command-on-directory.sh
Created September 16, 2016 17:35
Run Bash command on all files in a directory
for file in /Users/xyz/Desktop/my-dir/*; do echo "hello $file" >> results.out; done
@abdul
abdul / recreate_magento_indexer_tables.sql
Created September 16, 2016 17:39
Recreate Magento Index (Indexer) Tables
DROP TABLE IF EXISTS `index_process_event`;
DROP TABLE IF EXISTS `index_event`;
DROP TABLE IF EXISTS `index_process`;
CREATE TABLE `index_event` (
`event_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(64) NOT NULL,
@abdul
abdul / bucket_policy.json
Created September 16, 2016 17:45
AWS IAM Policy to allow Bucket only access
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::<bucket/prefix>",
"arn:aws:s3:::<bucket/prefix>/*"
@abdul
abdul / strict_bucket_policy.json
Created September 16, 2016 17:47
AWS IAM - Strict Bucket only policy - No BucketListing
{
"Statement": [
{
"Effect": "Deny",
"Action": [
"s3:*"
],
"NotResource": [
"arn:aws:s3:::<bucket>",
"arn:aws:s3:::<bucket>/*"
@abdul
abdul / docker_clean_all_images.sh
Created September 16, 2016 17:55
Useful Docker Commands
docker rmi $(docker images -q)
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
@abdul
abdul / find_large_files.sh
Last active September 16, 2016 17:59
Filesystem - Unix Commands (GNU/Linux Only)
find . -type f -print0 | xargs -0 du -h | sort -hr | head -20
@abdul
abdul / zendesk-hc-template-and-components-doc.md
Created March 9, 2017 11:26 — forked from erikzrekz/zendesk-hc-template-and-components-doc.md
Zendesk Help Center Template and Components Documenation

The help center has a series of HTML templates with accompanying components. I put this together to brief myself on the available features within a help center. The official documentation can be found here

Table of Contents

  • Header
  • Footer
  • Home
  • Category
  • Section
  • Article
  • Contribution