This file contains hidden or 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
| ``` | |
| $ > sudo mysql -uroot | |
| ``` | |
| ``` | |
| mysql > SELECT User, Host FROM mysql.user; | |
| ``` | |
| ``` | |
| mysql > DROP USER 'root'@'localhost'; | |
| ``` | |
| ``` |
This file contains hidden or 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
| 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) |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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" |
This file contains hidden or 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
| Blade Templating Admin Exmansy | |
| @extends(‘admin.layouts.app’) | |
| @section(‘content-header’) | |
| @role(‘super-admin’) | |
| @endrole | |
| @role(‘admin’) | |
| @endrole | |
| @role(‘member’) | |
| @endrole | |
| @endsection |
This file contains hidden or 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
| var json = config.Formatters.JsonFormatter; | |
| json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None; | |
| config.Formatters.Remove(config.Formatters.XmlFormatter); |
This file contains hidden or 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
| 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) |
This file contains hidden or 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
| // App\Providers\AppServiceProvider | |
| public function boot() | |
| { | |
| config(['app.locale' => 'id']); | |
| Carbon::setLocale('id'); | |
| date_default_timezone_set('Asia/Jakarta'); | |
| } |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| ########## 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 |