Skip to content

Instantly share code, notes, and snippets.

View daluu's full-sized avatar

David Luu daluu

View GitHub Profile
var redline = require( 'redline13-webdriver' );
// For local testing
var browser = redline.loadBrowser('chrome');
// var browser = redline.loadBrowser('phantomjs');
var By = redline.webdriver.By;
var until = redline.webdriver.until;
var defaultWait = 10000;
var baseUrl = "http://simplecms-450361855.us-east-1.elb.amazonaws.com/cmsmadesimple/";
@lateefj
lateefj / syncmap.go
Last active October 18, 2019 23:26
Simple Shared Map Example In Go With Timeouts
// Example on sharing a map with multiple goroutines
package main
import (
"errors"
"fmt"
"sync"
"time"
)
@miku
miku / pipeTee.go
Created December 29, 2016 00:03 — forked from sgmac/pipeTee.go
Example using io.TeeReader and io.Pipe
package main
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"sync"
import os
import boto.utils
import boto3
import requests
import datetime
import time
def get_contents(filename):
@reinaldorossetti
reinaldorossetti / #drag-drop.py
Last active July 15, 2021 16:49 — forked from florentbr/#drag-drop.py
Selenium - HTML5 drag and drop
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions
from time import sleep
from os import getcwd
# JavaScript: Drag and drop script
# param1 (WebElement): Source element to drag
@ctufts
ctufts / .block
Last active June 28, 2017 00:58
Interactive Scatterplot with Regression Line
license: gpl-3.0
height: 500
scrolling: no
border: no
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active December 4, 2025 16:10
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@ravibhure
ravibhure / git_rebase.md
Last active October 21, 2025 14:16
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@dixudx
dixudx / StreamToString.go
Created November 16, 2016 09:34 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@wojteklu
wojteklu / clean_code.md
Last active December 17, 2025 05:16
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules