Skip to content

Instantly share code, notes, and snippets.

View iashris's full-sized avatar
🎯
Focusing

Ashris iashris

🎯
Focusing
View GitHub Profile
@iashris
iashris / key.json
Last active January 14, 2016 22:11
{
"data": [
{
"Time": 12,
"Duration": 8
},
{
"Time": 30,
"Duration": 14
},
{
"data": [
{
"Start": 12,
"End": 20
},
{
"Start": 30,
"End": 44
},
@iashris
iashris / bull.json
Last active January 22, 2016 18:05
{
"restrictedslots": [{
"id": "5MgBikgcWnY",
"slots": [{
"Start": 20,
"End": 30
}, {
"Start": 39,
"End": 59
}, {
@iashris
iashris / base.geojson
Created August 13, 2016 07:19
Host for my epic files
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
shapeid x y ID prix oriy dx dy
0 68.1477241619 36.8458788934 0 68.1433944704 37.0734939595 0.00432969150000417 -0.2276150661
1 68.6418935475 36.8446070831 1 68.6433944704 37.0734939595 -0.00150092289999293 -0.228886876399997
2 69.1357450535 36.8428470621 2 69.1433944704 37.0734939595 -0.00764941689999432 -0.2306468974
3 69.6317614945 36.8402344954 3 69.6433944704 37.0734939595 -0.0116329758999996 -0.233259464100001
4 70.1309361323 36.8361516027 4 70.1433944704 37.0734939595 -0.0124583381000036 -0.237342356799999
5 70.6323849119 36.8295404598 5 70.6433944704 37.0734939595 -0.0110095584999925 -0.243953499699998
6 71.1383890625 36.8179363994 6 71.1433944704 37.0734939595 -0.00500540790000059 -0.255557560100002
7 71.6501602392 36.7976786176 7 71.6433944704 37.0734939595 0.00676576880000823 -0.2758153419
8 72.1652659292 36.7619632495 8 72.1433944704 37.0734939595 0.0218714588000068 -0.31153071
@iashris
iashris / index.html
Created November 24, 2016 20:43
This is the template of html file to use for p5js projects for me
<!DOCTYPE html>
<html>
<head>
<title>p5js fullscreen template</title>
</head>
<style type="text/css">
canvas {
position: fixed;
top: 0; left: 0;
z-index: 1;
@iashris
iashris / 2panel.html
Created December 8, 2016 14:53
Basic 2 panel website
<!DOCTYPE html>
<html>
<head>
<title>Archify</title>
</head>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300" rel="stylesheet">
<style type="text/css">
html{
overflow-x: hidden;
@iashris
iashris / firebase_storage_multi_file_upload.js
Created February 18, 2018 21:16 — forked from asciimike/firebase_storage_multi_file_upload.js
Upload multiple files transactionally in Firebase Storage
// set it up
firebase.storage().ref().constructor.prototype.putFiles = function(files) {
var ref = this;
return Promise.all(files.map(function(file) {
return ref.child(file.name).put(file);
}));
}
// use it!
firebase.storage().ref().putFiles(files).then(function(metadatas) {
(function() {
var _UDS_CONST_LOCALE = 'en';
var _UDS_CONST_SHORT_DATE_PATTERN = 'MDY';
var _UDS_MSG_SEARCHER_IMAGE = ('Image');
var _UDS_MSG_SEARCHER_WEB = ('Web');
var _UDS_MSG_SEARCHER_BLOG = ('Blog');
var _UDS_MSG_SEARCHER_VIDEO = ('Video');
var _UDS_MSG_SEARCHER_LOCAL = ('Local');
var _UDS_MSG_SEARCHCONTROL_SAVE = ('save');
var _UDS_MSG_SEARCHCONTROL_KEEP = ('keep');
@iashris
iashris / marinamele_sieve_atkin.py
Created June 19, 2019 08:04 — forked from mineta/marinamele_sieve_atkin.py
Python code. Sieve of Atkin algorithm to find prime numbers
import math
def atkin(nmax):
"""
Returns a list of prime numbers below the number "nmax"
"""
is_prime = dict([(i, False) for i in range(5, nmax+1)])
for x in range(1, int(math.sqrt(nmax))+1):
for y in range(1, int(math.sqrt(nmax))+1):
n = 4*x**2 + y**2
if (n <= nmax) and ((n % 12 == 1) or (n % 12 == 5)):