Skip to content

Instantly share code, notes, and snippets.

View lambdaX's full-sized avatar

Islam Ali lambdaX

View GitHub Profile
@lambdaX
lambdaX / package.json
Created October 7, 2020 20:59 — forked from mallendeo/package.json
Record gsap animations frame by frame with puppeteer
{
"name": "gsap-to-video",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"fs-extra": "^7.0.0",
"puppeteer": "^1.7.0"
}
}
@lambdaX
lambdaX / alexa.js
Created April 19, 2018 03:43 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;
@lambdaX
lambdaX / git-unsorted-log.go
Created February 28, 2016 18:58 — forked from timhughes/git-unsorted-log.go
An example of howto user git2go https://github.com/libgit2/git2go which is a libgit2 bindings package for golang
/*
requires libgit2
*/
package main
import (
@lambdaX
lambdaX / patchable.py
Last active September 21, 2015 12:41 — forked from jacobian/patchable.py
Adds PATCH support to tastypie
from django.core import urlresolvers
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.db import transaction
from tastypie.exceptions import BadRequest
from tastypie.http import HttpAccepted, HttpGone, HttpMultipleChoices
from tastypie.utils import dict_strip_unicode_keys
class Patchable(object):
"""
Mixin adding PATCH support to a ModelResource.
@lambdaX
lambdaX / tastypie_resource.py
Last active September 21, 2015 12:39
Example of a custom django-tastypie Resource
from tastypie import fields
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
from tastypie.bundle import Bundle
from tastypie.exceptions import NotFound
from tastypie.resources import Resource
# a dummy class representing a row of data
class Row(object):
@lambdaX
lambdaX / httpQmlJson.qml
Last active September 21, 2015 12:33 — forked from 40/httpQmlJson.qml
Simple HTTP JSON Request in QML
import bb.cascades 1.0
Page {
content: Container {
Label {
id: emailLabel
text: qsTr("Email")
}
Label {
id: urlLabel