Skip to content

Instantly share code, notes, and snippets.

View shams-ali's full-sized avatar

Shams Ali shams-ali

  • San Francisco, CA
View GitHub Profile
@shams-ali
shams-ali / github.sh
Last active July 1, 2016 22:22
Github Commands
#overwrite current branch to master
git checkout seotweaks
git merge -s ours master
git checkout master
git merge seotweaks
#force pull from master and overwrite
git fetch origin
git reset --hard origin/master
@shams-ali
shams-ali / postgres.sh
Created June 30, 2016 18:58
Postgres Commands
#show schemas
\dt
#show all rows and collumns
SELECT * FROM [table];
#remove duplicates
SELECT DISTINCT [collumn] FROM [TABLE]
@shams-ali
shams-ali / sqlCommands.txt
Last active July 30, 2016 20:13
SQL Commands
//create db
CREATE DATABASE db_name;
//create table
CREATE TABLE table_name
(
col1_name datatype,
col2_name datatype,
col3_name datatype,
...
@shams-ali
shams-ali / infoSession.txt
Last active January 16, 2017 19:28
Info Session Run Down
- we're just giving them a taste of what it's like to code. you just open jsbin, explain to them what a variable is as you show them how to write it, do the same with functions and if statements, and then create a function that's a "greeter app" with them where the computer is prompted to say "good morning," "good afternoon," or "good night" based on what time of day it is. then you call the function with different times. when you're creating the greeter app you do it more code along style so that the students are getting the concept of creating if statements and seeing how easy it can be
What is a variable
- You can place data into these containers and then refer to the data simply by naming the container.
- references to data stored in memory
//create a program that's a "greeter app" where the computer is prompted to say "good morning," "good afternoon," or "good night" based on what time of day it is.
//pseudocode this first
@shams-ali
shams-ali / nginx.conf
Created February 22, 2017 01:21
nginx config
#new bondfar
worker_processes 1;
events {
worker_connections 1024;
}
http {
client_max_body_size 500M;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">