Skip to content

Instantly share code, notes, and snippets.

View ranaroussi's full-sized avatar

Ran Aroussi ranaroussi

View GitHub Profile
@ranaroussi
ranaroussi / enumerate-notion-items.py
Created August 2, 2021 22:27 — forked from lenolib/enumerate-notion-items.py
Create a unique sequential id for items (tasks) in a notion database / view
import re
from notion.client import NotionClient
def enumerate_notion_items(
view_url, id_col, created_at_col="created_time", token=None, client=None
):
"""
Given that a property with name e.g. "Item ID" exists for a notion dataset,
and that at least one item has a value for that property, this function
@ranaroussi
ranaroussi / Clone-Github-Wiki-Pages.sh
Created September 19, 2020 22:51 — forked from hanxue/Clone-Github-Wiki-Pages.sh
Cloning Github Wiki Pages
hanxue-mac:Github hanxue$ git clone https://github.com/AppScale/appscale.wiki.git
Cloning into 'appscale.wiki'...
remote: Counting objects: 1745, done.
remote: Compressing objects: 100% (1733/1733), done.
remote: Total 1745 (delta 1089), reused 10 (delta 4)
Receiving objects: 100% (1745/1745), 267.93 KiB | 35.00 KiB/s, done.
Resolving deltas: 100% (1089/1089), done.
Checking connectivity... done
hanxue-mac:Github hanxue$ ls appscale.wiki/
.git/
SHEET_NAME="Sheet1"
URL="https://data.sparkfun.com/output/VFEEYZENwLCNwE8LZjDA.csv"

function myFunction() {
  ScriptApp.newTrigger("getData")
  .timeBased()
  .everyMinutes(1)
  .create();
}
@ranaroussi
ranaroussi / mac-quick-screenshare
Created April 17, 2017 07:42 — forked from shedali/mac-quick-screenshare
applescript to start screen recording using quicktime
tell application "QuickTime Player" to activate
tell application "System Events"
activate
--set UI elements enabled to true
tell process "QuickTime Player"
click menu item "New Screen Recording" of menu "File" of menu bar 1
end tell
end tell
tell application "QuickTime Player"
@ranaroussi
ranaroussi / api.py
Created December 22, 2015 11:10 — forked from alanhamlett/api.py
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@ranaroussi
ranaroussi / roll_ipython_in_aws.md
Created October 15, 2015 05:23 — forked from iamatypeofwalrus/roll_ipython_in_aws.md
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@ranaroussi
ranaroussi / ib-controller-init
Last active April 24, 2016 10:07 — forked from aidoom/ib-controller-init
IBContoller init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: IBController
# Short-Description: starts instance of IBController
# Description: starts instance of IBController using start-stop-daemon
### END INIT INFO
# IBController
IBC_PATH="/path/to/IBController"