Skip to content

Instantly share code, notes, and snippets.

View mayvazyan's full-sized avatar

Michael Ayvazyan mayvazyan

View GitHub Profile
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@knation
knation / salesforceId.js
Created November 6, 2015 19:00
JavaScript Salesforce ID Check & Expansion
/**
* The regex for a SF ID.
* @type {RegExp}
* @const
*/
var ID_REGEX = /^[0-9a-zA-Z]{15}([0-9a-zA-Z]{3})?$/;
/**
* Array used to expand a SF ID from 15 to 18 characters.
* @type {Array.<String>}
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@dweldon
dweldon / meteor-nginx
Last active January 22, 2024 06:53
This is an example of how to configure nginx to serve a meteor app.
server {
listen [::]:80;
listen 80;
server_name app.example.com;
return 301 https://$server_name$request_uri;
}
server {