Skip to content

Instantly share code, notes, and snippets.

View wisnubaldas's full-sized avatar
🐢
Focusing

wisnu baldas wisnubaldas

🐢
Focusing
View GitHub Profile

How to install Laravel globally in Ubuntu

===================================================================

Open your terminal using Ctrl+Alt+T and type the following commands

Step 1: Install Laravel

composer global require "laravel/installer"
@wisnubaldas
wisnubaldas / keyup-delay1.js
Created August 19, 2022 02:45 — forked from Kcko/keyup-delay1.js
jQuery - keyup with delay (timeout)
var delay = (function(){
var timer = 0;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
})();
$('input').keyup(function() {
@wisnubaldas
wisnubaldas / bookmarks-2022-07-03.json
Created July 3, 2022 11:13
bookmarks-2022-07-03.json
{
"guid": "root________",
"title": "",
"index": 0,
"dateAdded": 1637236261539000,
"lastModified": 1656846547357000,
"id": 1,
"typeCode": 2,
"type": "text/x-moz-place-container",
"root": "placesRoot",
@wisnubaldas
wisnubaldas / Kerong.py
Last active June 14, 2022 08:20
get status and open lock
import socket
import sys
import codecs
class Kerong:
def __init__(self, ip, port):
self.ip = ip
self.port = port
# Create a TCP/IP socket
@wisnubaldas
wisnubaldas / profile.md
Created June 14, 2022 04:58
my_profile

Wisnu Hidayat

wisnu baldas

<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class WbiBaruController extends Controller
{
import socket
import sys
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect the socket to the port where the server is listening
server_address = ('192.168.123.49', 5000)
print(sys.stderr, 'connecting to %s port %s' % server_address)
sock.connect(server_address)
@wisnubaldas
wisnubaldas / dropzone.php
Created February 20, 2022 15:55 — forked from kreativan/dropzone.php
Upload files with dropzone.js and php
<?php
// process $_POST request
if(isset($_POST["submitDropzone"])) {
// Do something
print_r($_POST);
}
?>
@wisnubaldas
wisnubaldas / install mac vim - gvim
Created October 16, 2021 14:43 — forked from hectorperez/install mac vim - gvim
install mac vim / gvim
Step 1. Install homebrew from here: http://brew.sh
Step 1.1. Run export PATH=/usr/local/bin:$PATH
Step 2. Run brew update
Step 3. Run brew install vim && brew install macvim
Step 4. Run brew link macvim
# http://stackoverflow.com/questions/21012203/gvim-or-macvim-in-mac-os-x/21012284#21012284
Adv:
- copy & paste between tabs
@wisnubaldas
wisnubaldas / keramik-calkulator.js
Last active January 25, 2024 06:11 — forked from hayes0724/cal.js
Tiling/Flooring Calculator
function cal() {
// Get total square feet to cover
var sf = document.getElementById('sf').value;
console.log(sf)
// Get tile size
var tileSize = document.getElementById('tileSize').value;
console.log(tileSize)
// Convert area to inches and divide by a single tile's area (ex 4x4 tile = 16), then divide by 144 to determine tiles needed.
var total = (sf * 144)/tileSize;
console.log(total)