Skip to content

Instantly share code, notes, and snippets.

View ammarfaizi2's full-sized avatar
๐Ÿ€
Baby Opossum Posse

Ammar Faizi ammarfaizi2

๐Ÿ€
Baby Opossum Posse
View GitHub Profile
<?php
if (isset($_GET['q'])){
header("Content-type:application/json");
$cont = array(
"content" => array(
"title" => '06vยฝ [480p & 720p]'
)
);
echo json_encode($cont);
}
<?php
/**
* @author Ammar Faizi <[email protected]>
* @license MIT
* @link https://t.me/laravelindonesia/111952
*/
for ($i=0; $i<10; $i++) {
echo "Test ".$i."\n";
@ammarfaizi2
ammarfaizi2 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created June 7, 2018 17:44 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
<?php
/**
* @param int $n
* @return string
*/
function saltGenerator($n = 5)
{
$s = range(chr(1), chr(255));
$r = ""; $c=count($s)-1;
#include <string>
#include <iostream>
static const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
<?php
/**
* Debian local configuration file
*
* This file overrides the settings made by phpMyAdmin interactive setup
* utility.
*
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
skip-grant-tables

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.

(Optional) Uninstall other versions of postgres

To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple.

dpkg -l | grep postgres
<?php
namespace App\Models;
use DB;
use Auth;
use ArrayObject;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Trade extends Eloquent
#include <stdio.h>
#include <string.h>
struct icetea_streama {
char *file;
char *content_type;
};
int main () {
struct icetea_streama ic;
strcpy(ic.file, "views/");
strcat(ic.file, "login");