Skip to content

Instantly share code, notes, and snippets.

console.log("running script")
This file has been truncated, but you can view the full file.
diff --git a/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js b/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js
index afa2025..ec325f7 100644
--- a/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js
+++ b/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js
@@ -22,7 +22,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR
// Modified to put `webpack` and `modules` under `loadableGenerated` to be backwards compatible with next/dynamic which has a `modules` key
// Modified to support `dynamic(import('something'))` and `dynamic(import('something'), options)
function _default({types:t}){return{visitor:{ImportDeclaration(path,state){let source=path.node.source.value;if(source!=='next/dynamic')return;let defaultSpecifier=path.get('specifiers').find(specifier=>{return specifier.isImportDefaultSpecifier();});if(!defaultSpecifier)return;const bindingName=defaultSpecifier.node.local.name;const binding=path.scope.getBinding(bindingNa
# Convert SVG to PNG resizing to a fixed canvans and keep frame around
# Order is important
magick convert -resize 144x144 -background none -density 1000 image.png -gravity center -extent 144x144 image.png
@bordeo
bordeo / setup-campus
Last active September 24, 2020 09:36
Hevelop Camup PC Setup
#!/bin/bash
# terminator
sudo add-apt-repository -y ppa:gnome-terminator
sudo apt-get update
sudo apt-get install -y terminator
# sublime text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
@bordeo
bordeo / upgrade-rancher.sh
Created June 6, 2019 14:20
Automatic rancher upgrade
#!/bin/bash
set -e
read -p 'New Version: ' new_version
old_container_name="$(docker ps --filter "name=rancher-server*" --format "{{.Names}}")"
old_version="$(expr $old_container_name : 'rancher-server-\(.*\)-no-cacerts')"
timestamp="$(/bin/date "+%Y-%m-%d--%H-%M-%S")"
echo "Upgrading rancher server..."
echo "$old_version -> $new_version"
#!/bin/bash
FOLDER_TO_CONVERT=$1
FOLDER_TO_SAVE=$2
for filename in $FOLDER_TO_CONVERT/*.jpg; do
basename="$(basename "$filename" .jpg)"
convert "$FOLDER_TO_CONVERT/$basename.jpg" -sampling-factor 4:2:0 -strip -quality 80 -interlace JPEG -colorspace sRGB "$FOLDER_TO_SAVE/$basename.jpg"
done
[
{ "keys": ["super+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+d"], "command": "duplicate_line" }, //-- Default is super+shift+D
{ "keys": ["super+`"], "command": "toggle_side_bar" },
{ "keys": ["super+shift+up"], "command": "swap_line_up" },
{ "keys": ["super+shift+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },
{ "keys": ["super+down"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
#!/bin/bash
BRANCH=$1
BRANCHSTG=$2
if [ -z $BRANCH ];
then
echo "You must specify branch"
echo "megeinstaging branch branch-staging"
exit 1
php bin/magento setup:install \
--db-host='127.0.0.1' --db-name='project_mage' --db-user='root' --db-password='password' \
--base-url='http://www.project.loc' --language='en_US' --timezone='Europe/Rome' --currency='EUR' \
--admin-firstname='Alex' --admin-lastname='Bordin' \
--admin-email='[email protected]' --admin-user='admin' --admin-password='password' \
--cleanup-database --use-rewrites=1 \
--key='yourkey'
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chown -R :www-data .
add
umask 002
to you dotfile. It let create new file and folder with group write permissions