brew uninstall --ignore-dependencies node icu4c
brew install node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name api.example.com; | |
location / { | |
root /usr/share/nginx/LARAVEL_DIR/public; | |
index index.php; | |
try_files $uri $uri/ /index.php$is_args$args; | |
location ~ \.php$ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function progress_bar($done, $total, $info="", $width=50) { | |
$perc = round(($done * 100) / $total); | |
$bar = round(($width * $perc) / 100); | |
return sprintf("%s%%[%s>%s]%s\r", $perc, str_repeat("=", $bar), str_repeat(" ", $width-$bar), $info); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step by step installation guide for nginx + PHP 7.1 on CentOS 7 | |
1. Add and enable Remi repos | |
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
yum install yum-utils | |
yum-config-manager --enable remi-php71 | |
2. Install php 7.1 and required modules | |
yum install php71-php-fpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
There are two main modes to run the Let's Encrypt client (called Certbot
):
- Standalone: replaces the webserver to respond to ACME challenges
- Webroot: needs your webserver to serve challenges from a known folder.
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com
.
HTML is served from /var/www/mydomain
, and challenges are served from /var/www/letsencrypt
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//untuk menentukan FPB 2 bilangan maka panggil fungsi gcf(angka1, angka2); | |
function gcf($a, $b) { | |
return ( $b == 0 ) ? ($a):( gcf($b, $a % $b) ); | |
} | |
//untuk menentukan KPK 2 bilangan maka panggil fungsi lcm(angka1, angka2); | |
function lcm($a, $b) { | |
return ( $a / gcf($a,$b) ) * $b; | |
} | |
echo "Soal Nomor 1-3. <br/>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Obviously, you would build up the request somewhere other than a route... | |
Route::get('/api', function() | |
{ | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->get('http://path/to/api'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Ihsan Faisal | |
*/ | |
class EscapeCommand | |
{ | |
const ESC = "\x1B"; | |
private $commands = ""; |
NewerOlder