Skip to content

Instantly share code, notes, and snippets.

View ferhatelmas's full-sized avatar
🚀

ferhat elmas ferhatelmas

🚀
View GitHub Profile
@ferhatelmas
ferhatelmas / bret_victor-reading_list.md
Created August 17, 2019 23:54 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@ferhatelmas
ferhatelmas / main.go
Created July 23, 2019 14:02 — forked from hyyking/main.go
Go linear regression
package main;
import(
"fmt"
)
type LinearFunction struct {
a float64
b float64
}
@ferhatelmas
ferhatelmas / service-checklist.md
Created October 3, 2016 18:29 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@ferhatelmas
ferhatelmas / disposable-email-provider-domains
Created July 4, 2016 10:08
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@ferhatelmas
ferhatelmas / temporary-email-address-domains
Created July 4, 2016 10:08 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@ferhatelmas
ferhatelmas / json_manipulator.sql
Created June 10, 2016 11:05 — forked from matheusoliveira/json_manipulator.sql
Simple PostgreSQL functions to manipulate json objects. (Note: performance is not a concern for those functions)
CREATE OR REPLACE FUNCTION public.json_append(data json, insert_data json)
RETURNS json
IMMUTABLE
LANGUAGE sql
AS $$
SELECT ('{'||string_agg(to_json(key)||':'||value, ',')||'}')::json
FROM (
SELECT * FROM json_each(data)
UNION ALL
SELECT * FROM json_each(insert_data)
@ferhatelmas
ferhatelmas / csv.sql
Created October 28, 2015 21:37 — forked from nepsilon/postgres-import-export-csv.md
Importing and Exporting CSV files with PostgreSQL
-- Import CSV into table t_words
COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;
-- You can tell quote char with QUOTE
-- and change delimiter with DELIMITER
-- Import CSV into table t_words,
-- telling what columns to use
COPY t_words("name", "count", "def") FROM 'file.csv' DELIMITER ',' CSV;
-- Export table to a CSV file
@ferhatelmas
ferhatelmas / gmail.py
Last active August 29, 2015 14:26 — forked from jasonrdsouza/gmail.py
Python script to access a gmail account and download particular emails
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_input("Enter your GMail username:")
pwd = getpass.getpass("Enter your password: ")
# connecting to the gmail imap server
m = imaplib.IMAP4_SSL("imap.gmail.com")
m.login(user,pwd)
m.select("cs2043") # here you a can choose a mail box like INBOX instead
@ferhatelmas
ferhatelmas / vineScrape.go
Last active August 29, 2015 14:25 — forked from cryptix/vineScrape.go
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@ferhatelmas
ferhatelmas / mandelbrot.sql
Last active August 29, 2015 14:25 — forked from rupey/mandelbrot.sql
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,