Skip to content

Instantly share code, notes, and snippets.

View innomatrix's full-sized avatar
💭
#don't #settle

Innomatrix innomatrix

💭
#don't #settle
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 September 18, 2024 00:44
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;
@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 September 8, 2024 23:28
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))),
@ygotthilf
ygotthilf / jwtRS256.sh
Last active September 20, 2024 17:57
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub