Skip to content

Instantly share code, notes, and snippets.

View luizwbr's full-sized avatar
👍
Now working with new frameworks!

Luiz Felipe Weber luizwbr

👍
Now working with new frameworks!
View GitHub Profile
@luizwbr
luizwbr / 0.NIFI-EnforceOrder-Example.md
Created November 26, 2019 21:10 — forked from ijokarumawak/0.NIFI-EnforceOrder-Example.md
NiFi EnforceOrder example template to sequentially process files by file names.

Process files in order by filename

Result

Without EnforceOrder

e
@luizwbr
luizwbr / send_welcome_mails.php
Last active May 29, 2018 17:43
Send Welcome Emails Magento 1.9
<?php
require_once('app/Mage.php');
ini_set('display_errors', 1);
Mage::app('admin');
$user_ids = array(1,2,3,4);
foreach ($user_ids as $id) {
$customer = Mage::getModel('customer/customer')->load($id);
$storeId = $customer->getSendemailStoreId();
$customer->setPassword($customer->getUsername());
@luizwbr
luizwbr / remove_all_orders_magento.php
Last active November 28, 2019 16:24
Remove all orders Magento 1.9
<?php
require_once('app/Mage.php');
ini_set('display_errors', 1);
Mage::app('admin');
$orderIds = array(1,2,3,4);
$orders = Mage::getModel('sales/order')->getCollection()
->addFieldToFilter('entity_id', (array) $orderIds);
foreach ($orders as $o) {
//load order object - I know it's not ok to use load in a loop but it should be ok since it's a one time script
$order = Mage::getModel('sales/order')->load($o->getId());
@luizwbr
luizwbr / gist:f2bb18db5e4b3bd6c093da0ae0117ee1
Last active January 31, 2018 11:05
Better css M Teams
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = `
.message-list-common:not(.chat-style) .medium-width .thread-action-reply-message, .message-list-common:not(.chat-style) .medium-width .conversation-collapsed {
width: 14rem;
position: absolute;
right: 60px;
top: 4px;
-webkit-transition: width 5s;
var pm2 = require('pm2');
var path = require('path');
pm2.start({
name: "PostgresSql",
script: "/postgres/bin/postgres.exe",
args: "-D /postgres/data/pgsql/",
exec_mode: "fork_mode",
max_memory_restart: '2G',
autorestart: true,
output: "out.log",
@luizwbr
luizwbr / LICENSE.txt
Created December 21, 2017 19:12 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@luizwbr
luizwbr / nodejs_java_encrypt_decrypt_128.js
Last active January 17, 2023 07:49
Encrypt and Decrypt using 128 for Nodejs or Javascript that actually works
// None of the tutorals could help me, so I adapted a few codes.
// What I really want is make a full duplex way between NodeJS and Java, using encrypt/decrypt with AES 128 bit
// 1 - you must have to generate the key
openssl enc -aes-128-cbc -k secret -P -md sha1
// key examples:
// DCDD74627CD60252E35DFBA91A4556AA
// 2CB24CFDB3F2520A5809EB4851168162
// 468CA14CA44C82B8264F61D42E0E9FA1
@luizwbr
luizwbr / gist:96c179baa466fec31427
Created January 27, 2015 12:08
Gerenciador de projetos: Van Helsing
* Projeto Zumbi
Você sabe que o projeto está morto, mas ele insiste em pegar no seu pé.
* Projeto Drácula
Você tenta acabar com ele de todo o jeito, mas ele continua a tirar o seu sangue e suor.
* Projeto Lobisomem
Meia noite, lua cheia e você até consegue escutar o uivo dele no seu e-mail.
* Projeto Frankenstein
@luizwbr
luizwbr / codigos-virtuemart2
Created August 23, 2012 20:50
Snippets Virtuemart 2.0
<?php
/**
* Canivete suiço do Joomleiro moderno #2
* - Códigos para VirtueMart 2.0
* weber.eti.br | virtuemartpro.com.br
* Luiz Weber @luizwbr
**/
// Virtuemart 2.0