Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Fajri Abdillah clasense4

🎯
Focusing
View GitHub Profile
@clasense4
clasense4 / .hyper.js
Created Jun 2, 2021
Hyper.js configuration
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@clasense4
clasense4 / validate_endpoint.py
Last active Dec 19, 2020
How to reverse URL Path into registered endpoint
View validate_endpoint.py
# MAPPING created using DRF function
# https://github.com/encode/django-rest-framework/blob/master/rest_framework/schemas/generators.py#L72
# from rest_framework.schemas.generators import EndpointEnumerator
# EndpointEnumerator().get_api_endpoints()
# Input
MAPPING = {
"urn:app:api": [
"/api/v2/user/{id}",
"/api/v2/followers/{user_id}",
View vagrant_box_import.md

Vagrant up is too slow

So I do this instead

wget https://vagrantcloud.com/bento/boxes/ubuntu-18.04/versions/202002.14.0/providers/virtualbox.box
file virtualbox.box
# virtualbox.box: gzip compressed data
mv virtualbox.box virtualbox.gz
gunzip virtualbox.gz
@clasense4
clasense4 / bot.py
Created Nov 17, 2018
Simple Telegram Bot
View bot.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple Bot to reply to Telegram messages.
This program is dedicated to the public domain under the CC0 license.
This Bot uses the Updater class to handle the bot.
First, a few handler functions are defined. Then, those functions are passed to
the Dispatcher and registered at their respective places.
Then, the bot is started and runs until we press Ctrl-C on the command line.
Usage:
@clasense4
clasense4 / readme.md
Created Oct 27, 2018
Resume Portfolio 2018
View readme.md

Pengalaman

8 Tahun

Keahlian

System Architecture, Solution Architect, Backend Engineer, Cloud Engineer, Data Engineer, Integration Engineer

1. Dropsuite Website Backup WHMCS Plugin

@clasense4
clasense4 / Program.cs
Last active Oct 12, 2018
C# .Net 4.7.2 Create cert
View Program.cs
using System;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
namespace ConsoleApp
{
class Program
{
static string Domain = "serverless.id";
View Vagrant create local box.md

Create box

This is how to install something in a VM and export it as a Vagrant box and use it locally.

First copy the Vagrantfile from below and change the box to the box you want as a base.

Run vagrant up to create the Virtual Machine and vagrant ssh to login.
On Windows you might have to put ssh.exe to your %PATH%. If you have installed git, you can use C:\Program Files\Git\usr\bin You can also login via Putty on host: "localhost", Port "2222", login: "vagrant", password: "vagrant".

View Berkenalan dengan DevOps.md

Apa itu DevOps

DevOps adalah serangkaian praktik yang mengotomatiskan proses antara pengembangan aplikasi dan tim pengembang agar mereka dapat melakukan proses build, test dan release perangkat lunak lebih cepat dan lebih handal. DevOps yang sudah berjalan dengan baik akan menghasilkan produk yang stabil dan meningkatkan nilai dari produk itu sendiri.

Kenapa DevOps sangat penting dalam industri IT

Salah satu best practices dalam DevOps yaitu melakukan update produk yang kecil dan cepat. Dalam industri IT, ini bisa disebut dengan minor / patch update. Dengan melakukan update produk yang kecil, organisasi/perusahaan dapat melakukan inovasi lebih cepat bagi produknya, juga dapat melakukan rollback dengan mudah jika ditemukan bug yang tidak ter-cover oleh automated testing maupun tim QA. Dengan praktek ini, Organisasi/Perusahan dapat me-monitor produk dan mendapatkan data yang paling berharga yaitu data pengguna.

Bagaimana Praktek DevOps?

@clasense4
clasense4 / lambda.js
Created Jul 20, 2017
Create DynamoDB Table from Lambda function
View lambda.js
// Configuring the AWS SDK
var AWS = require('aws-sdk');
AWS.config.update({region: 'REGION'});
exports.handler = (event, context, callback) => {
// TODO implement
// create DynamoDB service object
var dynamodb = new AWS.DynamoDB({region: 'REGION', apiVersion: '2012-08-10'});
/* This example creates a table named Music. */
var params = {
@clasense4
clasense4 / disable-xdebug.sh
Last active Nov 19, 2016 — forked from hacfi/disable-xdebug.sh
OS X homebrew php 7.0 enable/disable xdebug extension script
View disable-xdebug.sh
#!/bin/sh
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
echo "xdebug disabled"