Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Kousher alam kousherAlam

💭
I may be slow to respond.
Block or report user

Report or block kousherAlam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .block
license: mit
View google_login.ts
import { Request, Response } from "express";
import { successResponse } from "../../Helpers/Responses/successResponse";
import { ApiConfig } from "../../Configs/Api.Config";
import { errorResponse } from "../../Helpers/Responses";
const { OAuth2Client } = require("google-auth-library");
const { google } = require("googleapis");
export default async function googleLogin(request: Request, response: Response) {
console.log(ApiConfig.THIRD_PARTY_LOGIN_API.GOOGLE.SCOPES);
View IG100_development_doc.md

Lua Syntax

Lua is a dynamically typed language. There are no type definitions in the language. All values carry their own type. All values in Lua are first-class values. This means that all values can be stored in variables, passed as arguments to other functions, and returned as results

There are eight basic types in Lua: nil, boolean, number, string, function, userdata, thread, and table.

The type table implements associative arrays, that is, arrays that can be indexed not only with numbers, but with any value (except nil). Tables can be heterogeneous; that is, they can contain values of all types (except nil).

Comment

single linke comment start with --

View Observer Promise.md

Observer and promises in javascript

The main defference between observable and promises is:

1. observer can emit multiple value, but promise only can work with single value. when promise `reject` or `resolve` they end.
2. promise is **eager** but observer are **lazy**
3. Promise are not cancelable but observable are cancelable 
4. Promises are always asynchronous but obervable are possibly asnychronous.
5. Promise are always multicast but Observable are both multicase and unicast

example:

@kousherAlam
kousherAlam / jsCoreDomFunctions.js
Last active Nov 19, 2018
basic dom functionality implemented with prototype
View jsCoreDomFunctions.js
document.addEventListener("DOMContentLoaded", function(){
// write your script here
var demo = _("demo");
demo.html("Hello").addClass("hi").attr('data-name','test')
.css('background-color-is-','black');
// demo.addClass("your anme");
// demo.fadeIn();
// demo.remove();
// demo.hide();
console.log(demo);
@kousherAlam
kousherAlam / browser-sync-config.js
Created Mar 4, 2018 — forked from christopher4lis/browser-sync-config.js
Webpack Dev Server + Browser Sync Config
View browser-sync-config.js
new BrowserSyncPlugin({
host: 'localhost',
port: 3001,
proxy: 'http://localhost:8081/',
files: [{
match: [
'**/*.hbs'
],
fn: function(event, file) {
if (event === "change") {
@kousherAlam
kousherAlam / hot-reload-extracted-stylesheets
Created Mar 4, 2018 — forked from christopher4lis/hot-reload-extracted-stylesheets
This snippet allows webpack-dev-server to hot reload stylesheets extracted with the ExtractTextWebpackPlugin
View hot-reload-extracted-stylesheets
if (module.hot) {
const hotEmitter = require("webpack/hot/emitter");
const DEAD_CSS_TIMEOUT = 2000;
hotEmitter.on("webpackHotUpdate", function(currentHash) {
document.querySelectorAll("link[href][rel=stylesheet]").forEach((link) => {
const nextStyleHref = link.href.replace(/(\?\d+)?$/, `?${Date.now()}`);
const newLink = link.cloneNode();
newLink.href = nextStyleHref;
@kousherAlam
kousherAlam / blog-loop.html
Created Feb 1, 2018 — forked from kylerush/blog-loop.html
An example of a blog post loop in Jekyll.
View blog-loop.html
{% for post in site.posts %}
<article class="{% if forloop.first %}first{% elsif forloop.last %}last{% else %}middle{% endif %}">
<div class="article-head">
<h2 class="title"><a href="/{{ post.url }}/" class="js-pjax">{{ post.title }}</a></h2>
<p class="date">{{ post.date | date: "%b %d, %Y" }}</p>
</div><!--/.article-head-->
<div class="article-content">
{{ post.long_description }}
<a href="/{{ post.url }}/" class="full-post-link js-pjax">Read more</a>
</div><!--/.article-content-->
@kousherAlam
kousherAlam / Angular-vscode-exclude.json
Last active Jan 26, 2018
Exclude Angular's all unnecessary files and folder form vscode :)
View Angular-vscode-exclude.json
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
// root level folder exclue
"node_modules": true,
".vscode": true,
View links
You can’t perform that action at this time.