Skip to content

Instantly share code, notes, and snippets.

Zeal Murapa GoGross

Block or report user

Report or block GoGross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GoGross
GoGross / 1.mongodb-aws-setup-guide.md
Created Dec 25, 2018 — forked from calvinh8/1.mongodb-aws-setup-guide.md
MongoDB Setup Guide for AWS EC2 Instances with Auth Enabled
View 1.mongodb-aws-setup-guide.md
@GoGross
GoGross / falsey.js
Created Oct 24, 2018
javascript | node.js ultimate FALSEY validator
View falsey.js
function falsey( val ) {
return !(
val === 'undefined' ||
val === undefined ||
val === false ||
val === "false" ||
val === null ||
val === 'null' ||
val === 'NaN' ||
val === NaN ||
@GoGross
GoGross / parse-server-cloud-http.js
Created Aug 4, 2018
parse server complete cloud http single thread
View parse-server-cloud-http.js
let now = new Date ();
let ISODate = new Date ( now.toISOString () );
let TimeStamp = ISODate.getTime ();
let api_access_key = "api_access_key";
let api_secret_key = "api_secret_key";
let url = "https://test-emoney-services.w-ha.com/api/";
let body = {
"subscriber" : {
"lastname" : "Martin",
"firstname" : "Philippe",
@GoGross
GoGross / nodejs-request.js
Last active Aug 4, 2018
HMAC-SHA256 signature crypto
View nodejs-request.js
let now = new Date ();
let ISODate = new Date ( now.toISOString () );
let TimeStamp = ISODate.getTime ();
let api_access_key = "key1";
let api_secret_key = "key2";
let url = "https://test-emoney-services.w-ha.com/api/";
let body = {
"subscriber" : {
"lastname" : "Martin",
"firstname" : "Philippe",
@GoGross
GoGross / Delete-Clear-all-cookies.js
Created Jul 16, 2018
Delete, Clear all cookies including variants of www prefixed domains
View Delete-Clear-all-cookies.js
(function () {
var cookies = document.cookie.split("; ");
for (var c = 0; c < cookies.length; c++) {
var d = window.location.hostname.split(".");
while (d.length > 0) {
var cookieBase = encodeURIComponent(cookies[c].split(";")[0].split("=")[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path=';
var p = location.pathname.split('/');
document.cookie = cookieBase + '/';
while (p.length > 0) {
document.cookie = cookieBase + p.join('/');
@GoGross
GoGross / Country Currency Codes JSON
Created Jun 26, 2018
currency symol, name, plural, and decimal digits for all major and minor currencies
View Country Currency Codes JSON
[
{
"USD" : {
"symbol" : "$",
"name" : "US Dollar",
"symbol_native" : "$",
"decimal_digits" : 2,
"rounding" : 0,
"code" : "USD",
"name_plural" : "US dollars"
View UFW Commong.sh
# common
ufw allow ssh
ufw allow ftp
ufw allow 22
ufw allow from 15.15.15.0/24 to any port 22
ufw allow from 15.15.15.0/24 to any port 873
# ssl and http
ufw allow http
ufw allow https
@GoGross
GoGross / Check-if-object-has-property-set.js
Last active Mar 19, 2018
hasOwnProperty and other alternatives
View Check-if-object-has-property-set.js
if ('sessionTokens' in Config){
console.log( 'sessionToken is present {in}' )
}
if ('sessionTokenEmptys' in Config){
console.log( 'sessionTokenEmpty is present but empty {in}' )
}
if (Config.hasOwnProperty('sessionTokens')){
console.log( 'sessionToken is present {hasOwnProperty}' )
@GoGross
GoGross / dropall.js
Created Feb 28, 2018 — forked from cschlyter/dropall.js
MongoDB: Drop all mongodb databases
View dropall.js
// Usage: $ mongo dropAll.js
var dbs = db.getMongo().getDBNames()
for(var i in dbs){
db = db.getMongo().getDB( dbs[i] );
print( "dropping db " + db.getName() );
db.dropDatabase();
@GoGross
GoGross / nginxproxy.md
Created Jan 20, 2018 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

You can’t perform that action at this time.