This file contains hidden or 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 | |
| while IFS='' read -r line || [[ -n "$line" ]]; do | |
| statusCode=$(curl -s -o /dev/null -I -w "%{http_code}" $line) | |
| if [[ "$statusCode" != 2* ]]; then | |
| echo "${statusCode},${line}" | |
| fi | |
| done < "$1" | |
| # Usage: bash find_bad_urls.sh urls.txt >> failedurls.csv |
This file contains hidden or 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
| export interface IPubSubOptions { | |
| maxListeners?: number; | |
| } | |
| export class PubSub { | |
| private maxListeners: number; | |
| private listenerCount: number; | |
| private eventListeners: Map<string, Function[]>; |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const debug = require('debug'); | |
| const program = require('commander'); | |
| const bluebird = require('bluebird'); | |
| const { | |
| GRONIT_URL, CALCULATE_TAT_GRONIT_ID, NODE_ENV, | |
| } = require('../config/environment'); | |
| const log = (...args) => { | |
| console.log(...args); |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const path = require('path'); | |
| require('dotenv').config({ path: path.join(__dirname, '.env') }); | |
| const program = require('commander'); | |
| let cron; | |
| let main; | |
| program | |
| .version('0.0.1') |
This file contains hidden or 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
| export workspace=($HOME"/projects/project1" $HOME"/projects/project2"); | |
| export multiDirExec() { | |
| for dir in ${workspace[@]}; do | |
| echo 'Running >>>> '$dir ' >>>> ' $1 ; | |
| (cd "$dir" && eval "$1"); | |
| done; | |
| } |
This file contains hidden or 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
| # GET VERSION | |
| yarn -v (or --version) | |
| # GET HELP | |
| yarn help | |
| # CREATE PACKAGE.JSON | |
| yarn init | |
| yarn init -y // Use defaults |
This file contains hidden or 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
| # cache directive for all static apps | |
| index index.html; | |
| ssl_certificate /etc/nginx/ssl/ssl-bundle.crt; | |
| ssl_certificate_key /etc/nginx/ssl/star.quezx.com.key; | |
| # maintenance mode if file maintenance_on.html present | |
| if (-f $document_root/maintenance_on.html) { | |
| return 503; | |
| } | |
| error_page 503 @maintenance; |
This file contains hidden or 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
| # cache directive for all static apps | |
| index index.html; | |
| ssl_certificate /etc/nginx/ssl/ssl-bundle.crt; | |
| ssl_certificate_key /etc/nginx/ssl/star.quezx.com.key; | |
| # maintenance mode if file maintenance_on.html present | |
| if (-f $document_root/maintenance_on.html) { | |
| return 503; | |
| } | |
| error_page 503 @maintenance; |
This file contains hidden or 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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/yatish/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains hidden or 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
| projDir='~/releases' | |
| declare -A MYMAPS=( | |
| ["partner"]='staging' | |
| ["hire"]='dev' | |
| ["manage"]='staging' | |
| ); | |
| launchCmd=() |
NewerOlder