Skip to content

Instantly share code, notes, and snippets.

View alifhaikal88's full-sized avatar
💭
I may be slow to respond.

Alif Haikal Razak alifhaikal88

💭
I may be slow to respond.
  • Squickydoodle
  • Germany
View GitHub Profile
@alifhaikal88
alifhaikal88 / 2019-https-localhost.md
Created June 24, 2023 06:04 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

-- to use sqlCmd ( command line sql tool)
-- open command prompt and execute the "sqlcmd.exe" probably located at
-- "C:\Program Files\Microsoft SQL Server\100\Tools\Binn"
> sqlcmd.exe -U username -P password -S .\sqlServer
This will open sql server in cmd
1> select DB_Name()
@alifhaikal88
alifhaikal88 / recipe.example.md
Created December 7, 2018 03:57 — forked from peterbsmyth/recipe.example.md
Making chained API Calls using @ngrx/Effects

Making chained API Calls using @ngrx/Effects

Purpose

This recipe is useful for cooking up chained API calls as a result of a single action.

Description

In the below example, a single action called POST_REPO is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:

  1. POST a new repostiry
  2. GET the master branch of the new repository
  3. GET the files on the master branch
@alifhaikal88
alifhaikal88 / oracle-connectby.sql
Created October 11, 2018 16:04 — forked from shaik2many/oracle-connectby.sql
All about Oracle connect by
/*
It builds a hierarchical query.
There are 2 components to it:
"start with" -- this identifies all LEVEL=1 nodes in the tree
"connect by" -- describes how to walk from the parent nodes above to their children and their childrens children.
*/
select ename, empno, mgr from emp;
select lpad(' ',level*2,' ')||ename ename,
sys_connect_by_path(business_code, '/') path,
connect_by_isleaf is_leaf,
@alifhaikal88
alifhaikal88 / !WhatsApp On Web Monitor.md
Created September 30, 2018 14:24 — forked from parthpower/!WhatsApp On Web Monitor.md
Simple JS to monitor offline and online time of a contact.

WhatsApp On Web Monitor

What It does

It gives notifications when someone goes online or offline or typing. Open chat of the contact you want to monitor and start script.

Simple Way

@alifhaikal88
alifhaikal88 / vanilla-js-cheatsheet.md
Created June 17, 2018 16:38 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@alifhaikal88
alifhaikal88 / php-pdo-mysql-crud.md
Created June 8, 2018 04:26 — forked from odan/php-pdo-mysql-crud.md
Basic CRUD operations with PDO and MySQL

Basic CRUD operations with PDO

CRUD = Create, Read, Update, Delete

Open a database connection

$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';
@alifhaikal88
alifhaikal88 / 0_reuse_code.js
Created October 24, 2016 15:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alifhaikal88
alifhaikal88 / error.txt
Created February 9, 2016 05:58
chrome 48 gxt 2.3.1a-gwt22 exception
SEVERE: (TypeError) : Cannot read property 'getHeight_22_g$' of nullcom.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'getHeight_22_g$' of null
at Unknown.wrap_3_g$(Exceptions.java:36)
at Unknown.adjustHeights_0_g$(ColumnHeader.java:1074)
at Unknown.onAttach_17_g$(ColumnHeader.java:1162)
at Unknown.doAttachNative_0_g$(ComponentHelper.java:77)
at Unknown.doAttach_1_g$(ComponentHelper.java:21)
at Unknown.doAttach_2_g$(GridView.java:861)
at Unknown.doAttachChildren_24_g$(Grid.java:766)
at Unknown.onAttach_0_g$(Widget.java:354)
at Unknown.onAttach_2_g$(Component.java:1642)
@alifhaikal88
alifhaikal88 / designer.html
Last active August 29, 2015 14:15
designer
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;