Skip to content

Instantly share code, notes, and snippets.

View ulmaull's full-sized avatar
💭
Hallo

Maulana Ulum ulmaull

💭
Hallo
View GitHub Profile
```
$ > sudo mysql -uroot
```
```
mysql > SELECT User, Host FROM mysql.user;
```
```
mysql > DROP USER 'root'@'localhost';
```
```
class MainActivity:AppCompatActivity() {
internal var spinner:Spinner
internal var URL = "http://techiesatish.com/demo_api/spinner.php"
internal var CountryName:ArrayList<String>
protected fun onCreate(savedInstanceState:Bundle) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
CountryName = ArrayList()
spinner = findViewById(R.id.country_Name) as Spinner
loadSpinnerData(URL)
private function saveFile($name, $photo)
{
//set nama file adalah gabungan antara nama produk dan time(). Ekstensi gambar tetap dipertahankan
$images = str_slug($name) . time() . '.' . $photo->getClientOriginalExtension();
//set path untuk menyimpan gambar
$path = public_path('uploads/product');
//cek jika uploads/product bukan direktori / folder
if (!File::isDirectory($path)) {
//maka folder tersebut dibuat
@ulmaull
ulmaull / mantap soul kedua
Last active November 19, 2019 05:49
noted implementation
def recyclerview_version = "1.0.0"
def cardview_version = "1.0.0"
implementation "com.mikepenz:fastadapter-extensions-expandable:4.1.1"
//The tiny Materialize library used for its useful helper classes
implementation "com.mikepenz:materialize:1.2.1" // at least 1.2.0
implementation "com.mikepenz:fastadapter:4.1.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
Blade Templating Admin Exmansy
@extends(‘admin.layouts.app’)
@section(‘content-header’)
@role(‘super-admin’)
@endrole
@role(‘admin’)
@endrole
@role(‘member’)
@endrole
@endsection
var json = config.Formatters.JsonFormatter;
json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None;
config.Formatters.Remove(config.Formatters.XmlFormatter);
@ulmaull
ulmaull / NOted Route VB
Created November 6, 2019 05:39
Mantap Soul
Dim json = config.Formatters.JsonFormatter
json.UseDataContractJsonSerializer = False
json.SerializerSettings.Formatting = Newtonsoft.Json.Formatting.Indented
json.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None
config.Formatters.Remove(config.Formatters.XmlFormatter)
// App\Providers\AppServiceProvider
public function boot()
{
config(['app.locale' => 'id']);
Carbon::setLocale('id');
date_default_timezone_set('Asia/Jakarta');
}
@ulmaull
ulmaull / gist:0d7fc83069047e3f023cfce518a62cef
Created May 3, 2019 15:53
Provision WSL ( Windows Subsystem Linux )
apt-get -y update
apt-get -y upgrade
echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
locale-gen en_US.UTF-8
apt-get install -y software-properties-common curl
#repo nginx dan php
apt-add-repository ppa:nginx/development -y
apt-add-repository ppa:ondrej/php -y
@ulmaull
ulmaull / Instructions.sh
Created May 3, 2019 15:33 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa