Skip to content

Instantly share code, notes, and snippets.

View JaySunSyn's full-sized avatar
👌

Jalal Fathi JaySunSyn

👌
View GitHub Profile
@JaySunSyn
JaySunSyn / jalal.json
Last active July 3, 2023 19:32
Jalal LinkedIn Data
{
"public_identifier": "jalal-fathi",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/jalal-fathi/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230703%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230703T191422Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=3344cc77b7413db235095623fc2aa06b6aea1482a9dc3bd05e771eaa9c26bfbb",
"background_cover_image_url": null,
"first_name": "Jalal",
"last_name": "Fathi",
"full_name": "Jalal Fathi",
"follower_count": null,
"occupation": "Chief Podkiter at podkite.com at Podkite",
"headline": "Chief at podkite.com",
@JaySunSyn
JaySunSyn / medium-null-example-two.js
Last active October 14, 2019 17:46
medium-null-example-two
_valueChanged(value) {
if (value) {
this.postUpdate(value);
return;
}
this._errorMessage = 'Please input an amount'
}
@JaySunSyn
JaySunSyn / medium-null-example-one-solution.js
Last active October 15, 2019 08:08
medium-null-example-one-solution
function when(expression, trueFn, falseFn) {
if (expression != null) {
return trueFn();
}
if (falseFn != null) {
return falseFn();
}
return undefined;
}
@JaySunSyn
JaySunSyn / medium-null-example-one.js
Last active October 15, 2019 08:32
Example defined checking
// DON'T do this
function when(expression, trueFn, falseFn) {
if (expression) {
return trueFn();
}
if (falseFn) {
return falseFn();
}
return undefined;

Keybase proof

I hereby claim:

  • I am jaysunsyn on github.
  • I am jalalio (https://keybase.io/jalalio) on keybase.
  • I have a public key ASB0vIi6qhwg3Phy1DgDxiG4pyI0Shu47agbmiD2WZxjowo

To claim this, I am signing this object:

@JaySunSyn
JaySunSyn / index.js
Created January 21, 2018 12:48
Firebase functions Dynamic OG-Tags
exports.host = functions.https.onRequest((req, res) => {
const userAgent = req.headers['user-agent'].toLowerCase();
let indexHTML = fs.readFileSync('./hosting/index.html').toString();
const path = req.path ? req.path.split('/') : req.path;
const ogPlaceholder = '<meta name="functions-insert-dynamic-og">';
const metaPlaceholder = '<meta name="functions-insert-dynamic-meta">';
const isBot = userAgent.includes('googlebot') ||
userAgent.includes('yahoou') ||
userAgent.includes('bingbot') ||
<script src="../../node_modules/redux-thunk/dist/redux-thunk.min.js"></script>
<script>
(() => {
const callAPIMiddleware = ({dispatch, getState}) => {
return next => action => {
const {
types,
callAPI,
shouldCallAPI = () => true,
@JaySunSyn
JaySunSyn / todo-list.html
Last active January 17, 2018 17:31
Step 2
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<link rel="import" href="../bower_components/polymer/lib/elements/dom-repeat.html">
<link rel="import" href="redux/redux-mixin.html">
<dom-module id="todo-list">
<template>
<ul>
<template is="dom-repeat" items="[[todos]]" as="todo">
<li on-click="_remove">[[todo.text]] <span style="color: white">Remove</span></li>
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../../bower_components/polymer-redux/polymer-redux.html">
<link rel="import" href="redux-reducers.html">
<link rel="import" href="redux-selectors.html">
<link rel="import" href="redux-actions.html">
<script>
(() => {
App = window.App || {};
<script src="../../node_modules/redux/dist/redux.min.js"></script>
<script>
(() => {
const initialState = {
todos: [
{text: 'Buy Veggies'},
{text: 'Buy Fruits'},
{text: 'Buy Pizza'},
],