Skip to content

Instantly share code, notes, and snippets.

View beamop's full-sized avatar
:shipit:
~/dev/null

Marwâne beamop

:shipit:
~/dev/null
View GitHub Profile
@beamop
beamop / html_edge_cache.js
Created December 9, 2020 23:57
html edge cache for Wordpress using Cloudflare Workers
// IMPORTANT: Either A Key/Value Namespace must be bound to this worker script
// using the variable name EDGE_CACHE. or the API parameters below should be
// configured. KV is recommended if possible since it can purge just the HTML
// instead of the full cache.
// API settings if KV isn't being used
const CLOUDFLARE_API = {
email: "", // From https://dash.cloudflare.com/profile
key: "", // Global API Key from https://dash.cloudflare.com/profile
zone: "" // "Zone ID" from the API section of the dashboard overview page https://dash.cloudflare.com/
@beamop
beamop / 1-setup.md
Created August 17, 2020 23:24 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@beamop
beamop / winstall.ps1
Created May 25, 2020 21:01
My winget powershell script to download my apps using winget (Windows Package Manager for Windows 10)
winget install --id=Google.Chrome -e ; winget install --id=Mozilla.Firefox -e ; winget install --id=Discord.Discord -e ; winget install --id=WhatsApp.WhatsApp -e ; winget install --id=OpenJS.Nodejs -e ; winget install --id=Microsoft.WindowsTerminal -e ; winget install --id=Amazon.AWSCLI -e ; winget install --id=CPUID.CPU-Z -e ; winget install --id=Cryptomator.Cryptomator -e ; winget install --id=hiyohiyo.CrystalDiskInfo -e ; winget install --id=Git.Git -e ; winget install --id=plex.plexmediaplayer -e ; winget install --id=Microsoft.PowerToys -e ; winget install --id=SlackTechnologies.Slack -e ; winget install --id=Microsoft.Skype -e ; winget install --id=Valve.Steam -e ; winget install --id=Spotify.Spotify -e ; winget install --id=Microsoft.Teams -e ; winget install --id=Ubisoft.Uplay -e ; winget install --id=Microsoft.VisualStudioCode -e ; winget install --id=RARLab.WinRAR -e ; winget install --id=WiresharkFoundation.Wireshark -e
@beamop
beamop / repo-reset.md
Created February 8, 2020 01:03 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@beamop
beamop / docker-compose.yml
Created December 25, 2019 17:42
WordPress on Docker
version: '3'
services:
# Database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@beamop
beamop / docker-help.md
Created December 25, 2019 17:31 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@beamop
beamop / .tmux.conf
Last active June 9, 2019 18:52 — forked from gblmarquez/.tmux.conf
.tmux.conf with fish as default shell
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# support logging out and back in
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# pbcopy support
set-option -g default-command "reattach-to-user-namespace -l bash"
# vi mode
@beamop
beamop / tmux-cheatsheet.markdown
Created April 22, 2019 14:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/**
* @Route("/app/links/export.csv", name="app_export_links")
*/
public function exportLinksAction()
{
$em = $this->getDoctrine()->getManager();
$links = $em
->getRepository(Links::class)
->findAll();
@beamop
beamop / Procfile
Created December 31, 2018 00:28
heroku nginx config for symfony
web: vendor/bin/heroku-php-nginx -C nginx_app.conf web/