Skip to content

Instantly share code, notes, and snippets.

View saeedghx68's full-sized avatar

saeed gharedaghi saeedghx68

View GitHub Profile
@saeedghx68
saeedghx68 / spec.MD
Last active January 4, 2023 15:56 — forked from timharper27/spec.MD
Python test

Create a repository on GitHub, initialised with an empty Readme.

Build a django app which should produce an API for fetching fizzbuzz entities, a fizzbuzz entity is defined as a set of keyvalue pairs:

{
  "number": 1,
  "fizzbuzz": null,
  "placeholder_post": {
    "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
 "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
@saeedghx68
saeedghx68 / web-servers.md
Created December 18, 2017 07:38 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@saeedghx68
saeedghx68 / web-servers.md
Created December 18, 2017 07:38 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@saeedghx68
saeedghx68 / unique.js
Last active December 18, 2017 07:44
Generate unique id for using reporting in javascript
import _ from 'lodash'
String.fromCharCode(_.random(65,90)) + '-' + (+new Date()).toString().substr(1).match(/.{4}/g).join('-')