This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Idea taken from https://gist.github.com/jackcarter/d86808449f0d95060a40 | |
import time | |
import codecs | |
import requests | |
reader = codecs.getreader("utf-8") | |
# Obtain your's by creating a Slack app on https://api.slack.com/apps?new_app=1 and assign that to your workspace. | |
# Within this new app, go to "OAuth & Permissions" and in the section "Scopes > User Token Scopes" add the "files:read" and "files:write" Oauth scopes. | |
# Finally, you can now go to the top of the page and install the app to the workspace. After that you'll get the User OAuth Token that you can use on the script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BulmaModal { | |
constructor(modalButton) { | |
const target = modalButton.dataset.target; | |
if (target) { | |
this.button = modalButton; | |
this.modal = document.querySelector(target); | |
this.html = document.querySelector("html"); | |
this.openEvent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^camunda\.test$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://camunda.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotenv () { | |
set -a | |
[ -f .env ] && . .env | |
set +a | |
} | |
dotenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create secure key | |
ssh-keygen -t rsa -b 4096 -C "key_identifier" | |
# Upload key to server | |
ssh-copy-id -i ~/.ssh/id_rsa.pub user@host.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM WSL symlink guide here https://dev.to/themartes_/how-to-make-wsl2-even-faster-with-fast-git-28p8 | |
REM --------------------- | |
REM Now when we have our script we need to run it every time we boot into our machine. We also need to do that with the highest privileges because you need to be an admin to make a symlink from network drive to your base drive. | |
REM So go ahead and search for Task Scheduler. On the left sidebar you will see Task Scheduler Library. Click on it and on the right sidebar click on Create Task.... | |
REM Now make sure you'll give a name to your task, then write a little description and Check "Run with highest privileges". Also make sure you'll change Configure for: To Windows10 | |
REM Next click on Triggers tab and add new trigger. This will look fairly simple, Just make sure it's like this, and click OK. | |
REM Next click on Actions add New and Select the .bat script we created earlier with the following code: | |
REM --------------------- | |
@echo off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
"initialCols": 120, | |
"initialRows": 30, | |
"copyOnSelect": true, | |
"profiles": { | |
"defaults": { | |
"acrylicOpacity": 0.85, | |
"cursorColor": "#CCC", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
// Logs the nmae of the function | |
error_log( '>>> IN ' . __FUNCTION__ ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read -r url name ; do | |
wget -O $name $url | |
done < images.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let data = []; | |
$('[id^=form_19]').each((i, e) => { | |
let elm = $(e).find('> form'); | |
data.push(elm.data('formId')) | |
}); | |
copy(data); |