Skip to content

Instantly share code, notes, and snippets.

View jalalazimi's full-sized avatar
:electron:

Jalal azimi jalalazimi

:electron:
View GitHub Profile
@jalalazimi
jalalazimi / machine.js
Last active September 7, 2020 21:48
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
{"stories":[{"geo":{"lat":53.8337367,"lng":-2.4290148},"stories":[{"id":58776527,"title":"Principal Real Estate hotel fund invests €40m in Barcelona asset","location":{"country":"GB"}},{"id":58776361,"title":"'No panic' at Rangers after defeat to Hearts - Gary McAllister","location":{"country":"GB"}}]},{"geo":{"lat":47.9252568,"lng":-97.0328547},"stories":[{"id":58776522,"title":"Weather Talk: Serious cold is becoming rare","location":{"city":"Grand Forks","country":"US","state":"North Dakota"}}]},{"geo":{"lat":53.41291,"lng":-8.24389},"stories":[{"id":58776512,"title":"McCarthy & Stone sees profits slump and warns over first half hangover","location":{"country":"IE"}}]},{"geo":{"lat":-1.2920659,"lng":36.8219462},"stories":[{"id":58776462,"title":"Sophos Intercept X secures Android and iOS mobile users from fleeceware applications","location":{"city":"Nairobi","country":"KE"}}]},{"geo":{"lat":37.9922399,"lng":-1.1306544},"stories":[{"id":58776481,"title":"Los jóvenes se forman como 'Agentes Antirumores' en Ca
{"stories":[{"geo":{"lat":51.5073509,"lng":-0.1277583},"stories":[{"id":58602648,"title":"Stan Wawrinka battles past Medvedev to set up quarter-final with Zverev","location":{"city":"London","country":"GB"}},{"id":58602607,"title":"Twitch 'handing out £7MILLION contracts' to bag top gamers in costly 'streaming wars'","location":{"city":"London","country":"GB","state":"England"}},{"id":58602561,"title":"Moment man is repeatedly kicked in head during railway station brawl","location":{"city":"London","country":"GB","state":"England"}}]},{"geo":{"lat":37.09024,"lng":-95.712891},"stories":[{"id":58602638,"title":"Where to Draw the Line for Standing in Line","location":{"country":"US"}},{"id":58602616,"title":"Kobe Bryant Was Also Successful Off The Court With Oscar Win, Young Adult Books","location":{"country":"US"}},{"id":58602613,"title":"Trump to visit Michigan factory to tout trade agreement","location":{"country":"US"}},{"id":58602614,"title":"Schumer demands Bolton testify at impeachment trial: ‘Who knows w
{
repository(name: "react", owner: "facebook") {
owner {
avatarUrl
login
__typename
url
id
}
name
/*==================================================
* Timeline API
*
* This file will load all the Javascript files
* necessary to make the standard timeline work.
* It also detects the default locale.
*
* To run from the MIT copy of Timeline:
* Include this file in your HTML file as follows:
*
@jalalazimi
jalalazimi / Separate-Logic-from-Effects-in-Cycle.js.html
Last active June 10, 2018 10:10
Separate Logic from Effects in Cycle.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="app"></div>
@jalalazimi
jalalazimi / README.md
Created April 28, 2018 09:44 — forked from mdibaiee/README.md
TOEFL Speaking Exercise

TOEFL Speaking Exercises

Wake up every morning and read 5 - 10 questions aloud, think about them for 15 seconds, and then start recording your voice, and answer the question for 45 seconds. Play your voice recording back and see where you could do better, then try the next question!

@jalalazimi
jalalazimi / repeatArrayItemPerCount.js
Last active March 15, 2018 11:24
repeat Array Item Per Count
// repeatArrayItemPerCount([1,2],2) => [1,1,2,2]
const repeatArrayItemPerCount = (arr, count) => [].concat.apply([], [...arr.reduce((a, v) => [...a, Array(count).fill(v)], [])])
@jalalazimi
jalalazimi / findPropertyInDeepObj.js
Last active February 26, 2018 07:17
Find property by name in a deep object
function findPropertyInDeepObj(obj, key) {
if (_.has(obj, key))
return [obj];
var res = [];
_.forEach(obj, function(v) {
if (typeof v == "object" && (v = findPropertyInDeepObj(v, key)).length)
res.push.apply(res, v);
});
return res;
}
@jalalazimi
jalalazimi / .gitignore
Last active July 24, 2024 19:04
.gitignore for react native project
# OSX
.DS_Store
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100