Skip to content

Instantly share code, notes, and snippets.

View fazlurr's full-sized avatar

Fazlur Rahman fazlurr

View GitHub Profile
@nurcholisart
nurcholisart / send-outbound-message.md
Created March 5, 2022 11:19
Documentation on how to send outbound message in Qiscus Multichannel via REST API

Send Outbound Message

Send individual message

Verb

POST https://multichannel.qiscus.com/api/v3/admin/broadcast/client
@lrakai
lrakai / lambda-aws-ssm-run-command-on-ec2-instance.py
Last active January 9, 2024 16:29
Run commands on EC2 instances using Lambda and Systems Manager (SendCommand)
import boto3
import botocore
import time
def handler(event=None, context=None):
client = boto3.client('ssm')
instance_id = 'i-07362a00952fca213' # hard-code for example
response = client.send_command(
@avosalmon
avosalmon / upload-s3-webpack.mix.js
Last active July 9, 2022 18:24
Upload assets to S3 using Laravel Mix
const mix = require('laravel-mix');
const s3Plugin = require('webpack-s3-plugin');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
@joseluisq
joseluisq / database.module.ts
Last active April 18, 2023 07:40
Nest Database Module (Type ORM) with environment variables support
import { Module, Global, DynamicModule } from '@nestjs/common'
import { EnvModule } from './env.module'
import { EnvService } from './env.service'
import { TypeOrmModule } from '@nestjs/typeorm'
function DatabaseOrmModule (): DynamicModule {
const config = new EnvService().read()
return TypeOrmModule.forRoot({
type: config.DB_TYPE,
@bentinata
bentinata / ID.md
Last active April 10, 2019 04:16
Slaquette
  1. Jadilah pengguna yang berguna.

  2. Gunakan channel yang patut.
    #general untuk kepentingan umum
    #random jika ingin bercanda
    #rpl atau #mppl untuk diskusi mata kuliah dan tugas terkait
    #channel_kelompok untuk diskusi masing-masing kelompok.

  3. Kaji ulang setiap pesan yang akan dibuat.
    Pesan singkat dan langsung pada intinya.

@lukecav
lukecav / functions.php
Created January 12, 2018 18:47
Flexible Elementor Widgets Panel
add_action( 'elementor/editor/after_enqueue_styles', function() {
echo '<style type="text/css">
.elementor-panel .panel-elements-category-items {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.elementor-panel .elementor-element-wrapper {
const linkEl = document.createElement('link');
linkEl.rel = 'prefetch';
linkEl.href = urlWithYourPreciousData;
document.head.appendChild(linkEl);
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@aseure
aseure / manual-merge-and-rebase.sh
Created December 6, 2017 16:01
Manual "Merge and rebase"
git checkout my-new-feat
git rebase master
git checkout master
git merge my-new-feat --ff
#This is just a listing of the commands for generating your SSL certificates
#Run these commands one at a time from inside your ~/ssl folder
#Make sure you create your server.csr.cnf and your v3.ext files first inside the same folder
#private key generation
#This will ask you for a passphrase(password) do NOT lose this file or the password
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048
#create root certificate
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem