This file contains hidden or 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
#!/bin/bash | |
# basic stuff | |
sudo apt install -y file-roller gnome-tweaks simple-scan htop git git-flow gnome-shell-extension-manager colordiff webp | |
# fonts | |
sudo apt install -y fonts-open-sans | |
mkdir -p ~/.fonts/adobe-fonts/source-code-pro | |
git clone --depth=1 https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro | |
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro |
This file contains hidden or 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
#!/bin/bash | |
### VARIABLES ### \ | |
EMAIL="" | |
SERVER=$(hostname) | |
MYSQL_CHECK=$(mysql --login-path=mysql_login -e "SHOW VARIABLES LIKE '%version%';" || echo 1) | |
STATUS_LINE=$(mysql --login-path=mysql_login -e "SHOW SLAVE STATUS\G")"1" | |
LAST_ERRNO=$(grep "Last_Errno" <<< "$STATUS_LINE" | awk '{ print $2 }') | |
SECONDS_BEHIND_MASTER=$( grep "Seconds_Behind_Master" <<< "$STATUS_LINE" | awk '{ print $2 }') | |
IO_IS_RUNNING=$(grep "Slave_IO_Running:" <<< "$STATUS_LINE" | awk '{ print $2 }') |
This file contains hidden or 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
wget https://github.com/FiloSottile/mkcert/releases/download/v1.4.2/mkcert-v1.4.2-linux-amd64 \ | |
&& mv mkcert-v1.4.2-linux-amd64 mkcert \ | |
&& chmod +x mkcert \ | |
&& sudo cp mkcert /usr/local/bin/ |
This file contains hidden or 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
# Changing iTerm2 color in MacOSX when SSHing (so you know at a glance that you're no longer in Kansas) | |
# Adapted from https://gist.github.com/porras/5856906 | |
# 1. Create a theme in your terminal setting with the name "SSH" and the desired colors, background, etc. | |
# 2. Add this to your .bash_profile (or .bashrc, I always forget the difference ;)) | |
# 3. Optional but useful: in the terminal, go to Settings > Startup and set "New tabs open with" to | |
# "default settings" (otherwise, if you open a new tab from the changed one, you get a local tab with | |
# the SSH colors) | |
function tabc() { | |
local name=$1; if [ -z "$name" ]; then name="Default"; fi # if you have trouble with this, change |
This file contains hidden or 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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote')->load(197643); | |
/** @var Mage_Sales_Model_Quote_Item $item */ | |
foreach ($quote->getAllVisibleItems() as $item) { | |
$option = $item->getOptionByCode('additional_options'); | |
$additonalOptions = array(); |
This file contains hidden or 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
UPDATE eav_attribute SET | |
entity_type_id = 4, | |
attribute_model = NULL, | |
backend_model = 'eav/entity_attribute_backend_array', | |
backend_type = 'varchar', | |
backend_table = NULL, | |
source_model = NULL, | |
frontend_model = NULL, | |
frontend_input = 'multiselect', | |
frontend_class = NULL |
This file contains hidden or 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
#!/bin/bash | |
base_dir="$PWD" | |
changed_modules=$(git submodule summary | grep '^*' | cut -d ' ' -f 2,3) | |
echo "$changed_modules" | while read dir commits; do | |
cd "$dir" | |
git diff --name-only "$commits" | sed -e "s#^#$dir/#g" | |
cd "$base_dir" | |
done |
This file contains hidden or 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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
/** @var Enterprise_Rma_Model_Rma $rma */ | |
$rma = Mage::getModel('enterprise_rma/rma')->load(135215); | |
$qtys = array(); | |
/** @var Enterprise_Rma_Model_Item $item */ |
This file contains hidden or 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 | |
$quote = Mage::getModel('sales/quote')->load(123); | |
echo $quote->getShippingAddress()->getDiscountAmount(); |
This file contains hidden or 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
[ | |
{ | |
"DestinationCode":"GD-821348-08-69", | |
"StreetName":"KOŁOBRZESKA 41", | |
"City":"Gdańsk", | |
"District":"Gdańsk", | |
"Longitude":"18.5880", | |
"Latitude":"54.4038", | |
"Province":"Pomorskie", | |
"CashOnDelivery":"false", |
NewerOlder