Resources for learning web design & front-end development:
ONLINE
Design
| const loadFromDatabase = async () => { | |
| // Your database loading logic goes here | |
| // For example, you can use an API call to fetch the data from your backend | |
| // Make sure to return the fetched data or handle errors accordingly | |
| return 'from1'; | |
| return await yourDatabaseAPI.loadFormData(); | |
| }; | |
| const saveToDatabase = async (formData) => { |
| kopiraj(){ | |
| rsync -avh \ | |
| --exclude='markup/node_modules/' \ | |
| --exclude='wp/public/wp-content/themes/*/node_modules/' \ | |
| --exclude='wordpress/public/wp-content/themes/*/node_modules/' \ | |
| --exclude='wp/public/wp-content/uploads/assets/' \ | |
| --exclude='.env' \ | |
| --exclude='.idea/' \ | |
| --exclude='wp/vendor/' \ | |
| --exclude='wordpress/vendor/' \ |
| { | |
| "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
| "meta": { | |
| "theme": "elegant" | |
| }, | |
| "basics": { | |
| "name": "Muhamed Didović", | |
| "label": "Full Stack Web Developer", | |
| "image": "https://avatars1.githubusercontent.com/u/3872717?s=460&u=0347279297c79c031fbd4327965455be8f7e8fb5&v=4", | |
| "picture": "https://avatars1.githubusercontent.com/u/3872717?s=460&u=0347279297c79c031fbd4327965455be8f7e8fb5&v=4", |
| <?php | |
| // Usage: | |
| // Before | |
| @if ($errors->has('email')) | |
| <span>{{ $errors->first('email') }}</span> | |
| @endif | |
| // After: |
Resources for learning web design & front-end development:
ONLINE
Design
| /** | |
| * Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
| * @type {Date} | |
| */ | |
| function timeStamp() { | |
| // Create a date object with the current time | |
| var now = new Date(); | |
| // Create an array with the current month, day and time |
| // Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
| (function poll(){ | |
| $.ajax({ url: "server", success: function(data){ | |
| //Update your dashboard gauge | |
| salesGauge.setValue(data.value); | |
| }, dataType: "json", complete: poll, timeout: 30000 }); | |
| })(); |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
Here's all you have to do to add clustering to your node.js application.
cluster.js, and run cluster.js instead of server.js (or /bin/www, or whatever it's called for your project)server.js filevar cluster = require('cluster');
if (cluster.isMaster) {
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;| var gulp = require('gulp'), | |
| compass = require('gulp-compass'), | |
| gutil = require('gulp-util'), | |
| chalk = require('chalk'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglify'), | |
| imagemin = require('gulp-imagemin'), | |
| pngquant = require('imagemin-pngquant'), | |
| elixir = require('laravel-elixir'), |