Skip to content

Instantly share code, notes, and snippets.

View Yiddishe-Kop's full-sized avatar
🍹
Vacationing with Laravel

Yehuda Neufeld Yiddishe-Kop

🍹
Vacationing with Laravel
View GitHub Profile
@Yiddishe-Kop
Yiddishe-Kop / post-receive
Last active October 20, 2020 12:37
Laravel remote server deployment script
#!/bin/bash
TARGET="/var/www/pninim"
GIT_DIR="/home/<username>/repo/pninim.git"
BRANCH="master"
SLACK_POST_URL="https://hooks.slack.com/services/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"
while read oldrev newrev ref
do
@Yiddishe-Kop
Yiddishe-Kop / etc-nginx-sites-available-default
Last active September 29, 2020 11:22
Multiple Laravel applications on one server nginx configuration
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
~font/ max;
application/octet-stream max;
}
@Yiddishe-Kop
Yiddishe-Kop / replaceByHighlightColor.vba
Created March 31, 2020 11:09
Word script - replace text with certain highlight color
Sub replaceHighlights()
'Always start at the top of the document
Selection.HomeKey Unit:=wdStory
' wdPink - @@
' wdBrightGreen - @@@
With Selection.Find
.Text = "@"
@Yiddishe-Kop
Yiddishe-Kop / myFunctions.js
Last active March 9, 2019 18:33
My custom code to modify my Wordpress Site
// change all html code tags to "ltr"
let codes = document.querySelectorAll("code");
codes.forEach(code => {
code.setAttribute("dir", "ltr");
});
// change color of all "free" bubbles!
var bubbles = document.querySelectorAll(".badge-inner.new-bubble");
bubbles.forEach(bubble => {
if (bubble.innerText == "חינם!") {