Skip to content

Instantly share code, notes, and snippets.

View clasense4's full-sized avatar
🎯
Focusing

Fajri Abdillah clasense4

🎯
Focusing
View GitHub Profile
@clasense4
clasense4 / CustomerCest.php
Last active September 26, 2018 06:33
Yii2 + Codeception Cookie & Session problem / error, still got no solution for this. The cookie / session won't be share between tests (function). [Edit] check acceptance.yml
<?php
// use tests\codeception\backend\AcceptanceTester;
use tests\codeception\backend\acceptance\BaseStep;
class CustomerCest
{
public $user = 'Fajri';
// private $cookie = 'xyz';
@clasense4
clasense4 / app.php
Created November 10, 2016 05:59
AWS EB Worker Laravel Route Separation
<?php
# file : bootstrap/app.php
# ........
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
@clasense4
clasense4 / Vagrant create local box.md
Created April 6, 2018 07:16 — forked from kekru/Vagrant create local box.md
Vagrant: Create local box

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".

@clasense4
clasense4 / website.md
Last active April 4, 2018 06:56
Penjelasan tentang website, menurut pribadi

Website

Website Company Profile

Pendahuluan

Ini adalah website untuk sebuah perusahaan, umumnya untuk menjelaskan sebuah perusahaan, bergerak di bidang apa, apa yang dikerjakannya, dll. Ini adalah informasi yang dapat dipergunakan sebagai pengganti kartu nama. Bayangkan jika kita mendapatkan sebuah pekerjaan dari perusahaan XXX, yang pasti ada dalam benak kita, yaitu mencari info tentang perusahaan tersebut. Salah satu cara nya yaitu mencari website perusahaan tersebut. Website perusahaan harus dapat menjelaskan secara singkat padat dan jelas tentang perusahaan itu.

Style website bisa bermacam - macam, bisa berupa halaman, atau sebuah halaman yang panjang, atau dikombinasikan. Fitur umum nya yaitu halaman statis (tidak berpengaruh terhadap tanggal) seperti about, product, service dan contact, blog (di urut berdasarkan tanggal terbaru di paling atas), halaman pricing (tapi bukan ecommerce).

Contoh website :

@clasense4
clasense4 / Berkenalan dengan DevOps.md
Created March 25, 2018 08:42
Berkenalan dengan DevOps

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 July 20, 2017 17:32
Create DynamoDB Table from Lambda function
// 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 / Scrapy.md
Last active March 5, 2017 05:04
Install Scrapy 0.16.0 on Centos 6.6
yum install python-pip -y
yum install python-devel -y
yum install gcc gcc-devel -y
yum install libxml2 libxml2-devel -y
yum install libxslt libxslt-devel -y
yum install openssl openssl-devel -y
yum install libffi libffi-devel -y
CFLAGS="-O0"  pip install lxml
pip install Scrapy==0.16.0
@clasense4
clasense4 / scrapy
Last active December 29, 2016 04:19
scrapy on centos 7.3, work with digitalocean 512mb ram
# Base package
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum update -y
# Add swap
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile swap swap sw 0 0" >> /etc/fstab
@clasense4
clasense4 / disable-xdebug.sh
Last active November 19, 2016 12:25 — forked from hacfi/disable-xdebug.sh
OS X homebrew php 7.0 enable/disable xdebug extension script
#!/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"
@clasense4
clasense4 / command.sh
Created October 22, 2016 03:24
Fixing awk problem in OSX el capitan
brew unlink gawk
brew reinstall awk
awk