The setup installs the following software:
- Nginx
- MariaDB
- PHP
- Git
- Node
- Composer
| <?php | |
| /* Maafkan kalo penamaan variabelnya berantakan :D | |
| Ini juga agak lambat karena kompleksitasnya, terutama | |
| di baris 61-95 (pembuatan gambar latar yang di-blur | |
| untuk mengisi ruang kosong / menghindari crop) | |
| */ | |
| function imageoptim($imagepath, $savename) { | |
| // Set imagepath default | |
| $imagepath = "upload/source/{$savename}"; |
This is a quick tutorial explaining how to get a static website hosted on Heroku.
Why do this?
Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.
| <?php | |
| class ScrapBCA { | |
| private $ipaddress; | |
| private $user = 'user klik bca'; | |
| private $pass = 'pass klik bca'; | |
| private $bca_url = 'https://ibank.klikbca.com/'; | |
| private $bca_url_login = 'https://ibank.klikbca.com/authentication.do'; | |
| private $bca_url_menu = 'https://ibank.klikbca.com/nav_bar_indo/menu_bar.htm'; | |
| public function __construct() { |
| #!/bin/bash | |
| echo "###########################" | |
| echo "# Choose SSH Access #" | |
| echo "###########################" | |
| echo "1) SSH to ..." | |
| echo "0) exit" | |
| echo | |
| printf 'choose [1/2/3/0] : ' |
This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.
Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.
Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| <?php | |
| /** | |
| * Check if a directory is empty (a directory with just '.svn' or '.git' is empty) | |
| * | |
| * @param string $dirname | |
| * @return bool | |
| */ | |
| function dir_is_empty($dirname) | |
| { | |
| if (!is_dir($dirname)) return false; |