Skip to content

Instantly share code, notes, and snippets.

View ivanaugustobd's full-sized avatar
🦥
Automating stuff

Ivan Augusto ivanaugustobd

🦥
Automating stuff
  • World Wide Weeb
View GitHub Profile
@plainspooky
plainspooky / vbshortcuts
Last active November 6, 2015 10:48
VirtualBox shortcuts to an easy VM management, feel free to fix and imporove.
#!/bin/bash
#
# vbshortcuts
# VirtualBox shortcuts to an easy VM management, feel free to dix and imporove.
#
# use: "$ source vbshortcuts" or "$ . vbshortcuts"
#
# (c)2015 - Giovanni Nunes <giovanni.nunes@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
@daniloaldm
daniloaldm / step-1-php-apache.sh
Last active October 7, 2020 18:28 — forked from kelvysmoura/step-1-php-apache.sh
Configuração de ambiente para a instalação do magento 2
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php5.6 -y
sudo apt install php7.0 -y
sudo apt install php7.1 -y
sudo apt install php7.2 -y
@goncalossilva
goncalossilva / .gitconfig
Last active April 8, 2021 15:25
Autoremove deleted and merged branches, locally and remotely.
[alias]
autoremove = "!f() { \
whitelist=\"master|dev|legacy\"; \
git fetch --prune; \
if [ -z \"$1\" ]; then \
list=$(git branch --merged | egrep -v \"(^\\*|$whitelist)\") && \
cmd='echo \"$list\" | xargs -n 1 git branch -d'; \
else \
list=$(git branch -r --merged | grep \"$1\" | egrep -v \"(>|$whitelist)\") && \
cmd='echo \"$list\" | cut -d'/' -f2- | xargs -n 1 git push \"$1\" --delete'; \
generatePagesArray: function(currentPage, collectionLength, rowsPerPage, paginationRange)
{
var pages = [];
var totalPages = Math.ceil(collectionLength / rowsPerPage);
var halfWay = Math.ceil(paginationRange / 2);
var position;
if (currentPage <= halfWay) {
position = 'start';
} else if (totalPages - halfWay < currentPage) {
#!/bin/bash
## Update and Upgrade Distro
sudo apt update && sudo apt upgrade -y &&
## Install Addons Codecs
sudo apt install ubuntu-restricted-extras -y &&
## Setting Buttons to Left Side
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' &&
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:' &&
## Install VLC Player
sudo apt-get install vlc -y &&
@mklooss
mklooss / remove_Temando_Shipping.sql
Last active February 13, 2023 19:09
Remove Temando_Shipping from Magento2!
DELETE FROM eav_attribute WHERE attribute_code IN('ts_dimensions_length', 'ts_dimensions_width', 'ts_dimensions_height', 'ts_packaging_type', 'ts_packaging_id', 'ts_country_of_origin', 'ts_hs_code');
DROP TABLE temando_order;
DROP TABLE temando_quote_collection_point;
DROP TABLE temando_collection_point_search;
DROP TABLE temando_order_collection_point;
DROP TABLE temando_quote_pickup_location;
DROP TABLE temando_pickup_location_search;
DROP TABLE temando_order_pickup_location;
@isluewell
isluewell / AppName.php
Last active May 11, 2023 12:18
[6.0] Command app:name
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Composer;
use Symfony\Component\Finder\Finder;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputArgument;
@ilkereroglu
ilkereroglu / simply-sending-e-mails-with-mailx.md
Created September 22, 2015 21:53
How To Send E-Mail On CentOS 7

Installing mailx

yum -y update
yum install -y mailx

We can now start sending e-mails using

@vjeux
vjeux / x.md
Last active January 6, 2024 07:15
Ocaml / functional programming

I'm taking down this post. I just posted this as a side comment to explain a sentence on my latest blog post. This wasn't meant to be #1 on HN to start a huge war on functional programming... The thoughts are not well formed enough to have a huge audience. Sorry for all the people reading this. And please, don't dig through the history...

@missoxd
missoxd / magento2-deferred-async-webrequests.php
Created September 4, 2020 23:26
Magento 2 deferred async web requests test
<?php
require __DIR__ . '/app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$objectManager->get('\Magento\Framework\App\State')->setAreaCode('adminhtml');
$registry = $objectManager->get('\Magento\Framework\Registry');
$registry->register('isSecureArea', 'true');