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
| #!/bin/bash | |
| # Update system packages | |
| sudo dnf update -y | |
| # Install Docker | |
| sudo dnf install -y docker | |
| # Start and enable the Docker service | |
| sudo systemctl start docker |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/bin/bash | |
| # --- Set up error handling and user feedback --- | |
| set -e | |
| echo "Starting software installation script... ⏳" | |
| echo "----------------------------------------" | |
| # --- Install essential dependencies --- | |
| echo "⚙️ Checking for wget and unzip..." | |
| sudo apt update -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
| function login() { | |
| if (checker()) { | |
| axios | |
| .post('/api/login', { | |
| username: username.value, | |
| password: password.value | |
| }) | |
| .catch(function (error) { | |
| console.log(error); | |
| alert(error) |
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
| from flask import Flask, request | |
| from flask_restful import Resource, Api | |
| app = Flask(__name__) | |
| api = Api(app) | |
| class data_api(Resource): | |
| def post(self): | |
| json_data = request.get_json() | |
| print(json_data['data']) |
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
| $config['base_url'] = "http://".$_SERVER['HTTP_HOST']; | |
| $config['base_url'] .= preg_replace('@/+$@', '', dirname($_SERVER['SCRIPT_NAME'])).'/'; |
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
| Sub ListSheetNamesInNewWorkbook() | |
| Dim objWorkbook As Workbook | |
| Dim objWorksheet As Worksheet | |
| Set objWorkbook = ActiveWorkbook | |
| Set objWorksheet = objWorkbook.Sheets("daftar_isi") | |
| For i = 1 To ThisWorkbook.Sheets.Count | |
| objWorksheet.Cells(i, 1) = i | |
| objWorksheet.Cells(i, 2) = ThisWorkbook.Sheets(i).Name |
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 }} - Echo content | |
| {{ $var or 'default' }} - Echo content with a default value | |
| {{{ $var }}} - Echo escaped content | |
| {{-- Comment --}} - A Blade comment | |
| @extends('layout') - Extends a template with a layout | |
| @if(condition) - Starts an if block | |
| @else - Starts an else block | |
| @elseif(condition) - Start a elseif block | |
| @endif - Ends a if block |
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 a = document.querySelectorAll('input[type=radio]'); | |
| for (var i=0; i<a.length; i++) | |
| // from https://stackoverflow.com/a/18066088/8148848 | |
| a[i].checked = ( (Math.random()*10) > 5) ? true : false; |
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
| # Copyright 2014-2017 Bert Carremans | |
| # Author: Bert Carremans <bertcarremans.be> | |
| # | |
| # License: BSD 3 clause | |
| import os | |
| import random | |
| from shutil import copyfile |
NewerOlder