Skip to content

Instantly share code, notes, and snippets.

View AppMkrATL's full-sized avatar
🎯
Focusing

Sam Khaled AppMkrATL

🎯
Focusing
  • Greater Atlanta Area - Georgia - USA
View GitHub Profile
@AppMkrATL
AppMkrATL / gist:523453a357b894388a02fa581902ee78
Created December 1, 2018 23:01 — forked from rholdy/gist:2e5ebf5e09777b42ce605fab91acf68c
How to leverage a personal or professional connection to amplify your reach beyond your own network.
Facebook:
Hey everyone! I recently created a Ruby on Rails crash course for a friend, and I thought there might be other people I know that have been interested in learning programming.
You can watch the video here:
https://www.youtube.com/watch?v=4zrHEJe8030
Tag someone in the comments that you think might be interested as well.
Reddit:
@AppMkrATL
AppMkrATL / wget-crawl-script.sh
Created November 11, 2018 18:01
WGET Crawl Script
#!/bin/sh
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com
### V1
# wget \
# --recursive \
# --no-clobber \
# --page-requisites \
# --html-extension \
@AppMkrATL
AppMkrATL / almost-ascii-deletion-distance.py
Created September 19, 2018 01:20 — forked from fish2000/almost-ascii-deletion-distance.py
Almost ASCII Deletion Distance
def ascii_deletion_distance(str1, str2):
from collections import defaultdict
histogram = defaultdict(int)
for ch in str1:
histogram[ch] += 1
for ch in str2:
histogram[ch] += 1
union = set(str1) | set(str2)
intersection = set(str1) & set(str2)
result = union - intersection
@AppMkrATL
AppMkrATL / geocode-address.js
Created September 12, 2018 04:37 — forked from codeguy/geocode-address.js
Geocode address with Google Maps API
/**
* Geocode address
*
* REQUIREMENTS
* - Google Maps API
* - HTML5 Geolocation API
*/
var geocode = function (address, onSuccess, onError) {
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ address: address }, function (results, status) {
@AppMkrATL
AppMkrATL / get-current-location.js
Created September 12, 2018 04:35 — forked from codeguy/get-current-location.js
Get user's current gelocation with HTML Geolocation API
if ('geolocation' in navigator) {
console.log('Supports HTML geolocation API');
(function () {
var onSuccess = function (location) {
console.log('User location', location);
var userLat = location.coords.latitude,
userLon = location .coords.longitude;
},
@AppMkrATL
AppMkrATL / Knex-Migrations-Seeding.md
Created August 1, 2018 13:22 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@AppMkrATL
AppMkrATL / Knex-Setup.md
Created August 1, 2018 13:22 — forked from NigelEarle/Knex-Setup.md
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init