Skip to content

Instantly share code, notes, and snippets.

View ahashem's full-sized avatar
😎
Just started!

Ahmed ahashem

😎
Just started!
View GitHub Profile
@ahashem
ahashem / postgres-cheatsheet.md
Created March 16, 2021 09:57 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@ahashem
ahashem / rtx-platform-getAllCountriesCities.js
Created October 3, 2018 10:21
scrab list of all countries and cities from RTX platform using NodeJS
/* eslint-disable */
/**
* Get All Cities from all RTX platform countries
* To run:
* 1. Try the url in your browser and Get Cookie from your browser request.
* 2. install `request-promise`
* 2. run: `node cities.js`
*/
@ahashem
ahashem / README.md
Created June 25, 2018 05:43 — forked from boneskull/README.md
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
@ahashem
ahashem / mysql-5.6-Docker
Created June 20, 2018 14:00
mysql-5.6 Docker file
FROM debian:stretch-slim
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r mysql && useradd -r -g mysql mysql
RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/*
# add gosu for easy step-down from root
ENV GOSU_VERSION 1.7
RUN set -x \
@ahashem
ahashem / homebrew_multiple_mysql_versions.md
Last active June 20, 2018 14:03 — forked from benlinton/multiple_mysql_versions_for_development.md
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@ahashem
ahashem / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
/*jshint asi:true, forin:true, noarg:true, noempty:true, eqeqeq:false, bitwise:true, undef:true, curly:true, browser:true, devel:true, smarttabs:true, maxerr:50 */
/******************************************************************************
*
* SOAP
* Author: Kerri Shotts
*
* This library includes simple SOAP functions. MIT license.
*
*
* Usage is pretty straightforward: