Skip to content

Instantly share code, notes, and snippets.

View innomatrix's full-sized avatar
💭
#lecimy....

Innomatrix innomatrix

💭
#lecimy....
View GitHub Profile
@VcodeMe
VcodeMe / pimcore-docker-dev.md
Last active February 21, 2023 21:34
Pimcore X - docker dev
  1. git clone https://github.com/dockerwest/compose-pimcore.git && cd compose-pimcore
  2. ./environment
  3. run up
  4. New shell window and ./environment shell
  5. create_db pimcore
  6. docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'

6a. Only IP: docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##' | grep mysql | grep -oP '\d+(\.\d+){3}'

  1. ./vendor/bin/pimcore-install --admin-username=admin --admin-password=admin --mysql-username=root --mysql-password=toor --mysql-database=pimcore --mysql-host-socket=172.22.0.3 --mysql-port=3306 --no-interaction --ignore-existing-config
@nowendwell
nowendwell / Calendar.php
Last active March 16, 2024 02:08
Laravel Livewire FullCalendar
<?php
namespace App\Http\Livewire;
use App\Models\Event;
use Livewire\Component;
use Illuminate\Support\Str;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Cache;
@dnburgess
dnburgess / gist:b0562675f27d9ab44fa6fc17cbc48ee7
Created March 1, 2021 00:58
Setup Google OAuth for Portainer Remote Access
You're going to need a Google Developer's Account: https://console.developers.google.com/
https://console.cloud.google.com/projectselector2/home/dashboard?authuser=2&organizationId=0&supportedpurview=project
You'll need to know what you want your Portainer URL to be.
Create a Project
Enter a Project Name and click "Create"
APIs & Services
@leandronascimento
leandronascimento / CategoryHelper.php
Created October 3, 2019 04:10 — forked from kaianuar/CategoryHelper.php
Using spatie/crawler and crawl a page and retrieve all links within that page.
<?php
namespace App\Http\Crawler;
use Spatie\Crawler\CrawlObserver;
use GuzzleHttp\Exception\RequestException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriInterface;
use Symfony\Component\DomCrawler\Crawler as DomCrawler;
@dfedorov-ciena
dfedorov-ciena / ubuntu-hardening.md
Created May 6, 2019 16:18 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
@holmberd
holmberd / deploy-keys.md
Last active February 11, 2024 20:36
Setup GitHub repository SSH deploy keys

Setup GitHub repository SSH deploy keys

  1. Create GitHub repository in github and save the SSH repository url

  2. Init git on server in code directory

  • git init
  1. Create SSH keys on the server
  • ssh-keygen -t rsa -b 4096 -C your@email.here
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem
@tnraro
tnraro / area-polyfill.js
Last active July 12, 2021 15:08
determine the area of a polygon. using shoelace formula algorithm.
Math.area = Math.area || function(polygon){
const length = polygon.length;
let sum = 0;
for(let i = 0; i < length; i += 2){
sum += polygon[i ] * polygon[(i + 3) % length]
- polygon[i + 1] * polygon[(i + 2) % length];
}
@hernandev
hernandev / nginx.conf
Created December 8, 2017 07:35
Vue.JS redirect history mode URL's to hash mode URL's. (Using Nginx)
server {
listen 80 default_server;
listen [::]:80 default_server;
root /web;
index index.html;
location / {
try_files $uri $uri/ @rewrites;
@journeymanavi
journeymanavi / production-web-server-setup-and-deployment-guide.md
Last active May 18, 2024 14:54
A runbook for setting up a Linux based secure, production web server, for serving static web content as well as deploying Node.js based web applications.
@alexpsi
alexpsi / asyncChunkedMap.js
Created February 25, 2017 20:31
Like Promise.all but executed in chunks, so you can have some async concurrency control.
const chunks = (arr, chunkSize) => {
let results = [];
while (arr.length) results.push(arr.splice(0, chunkSize));
return results;
};
module.exports = (xs, f, concurrency) => {
if (xs.length == 0) return Promise.resolve();
return Promise.all(chunks(xs, concurrency).reduce(
(acc, chunk) => acc.then(() => Promise.all(chunk.map(f))),