Skip to content

Instantly share code, notes, and snippets.

View mauriciopazpp's full-sized avatar

Mauricio Paz mauriciopazpp

  • Guarapuava-PR / Brazil
  • 17:22 (UTC -12:00)
View GitHub Profile
@mauriciopazpp
mauriciopazpp / ReactNativeTabs.js
Created August 1, 2018 01:07
Tabs for React Native
import React from 'react';
import { Button, Text, View } from 'react-native';
import { Ionicons } from '@expo/vector-icons'; // Version can be specified in package.json
import { StackNavigator, TabNavigator, TabBarBottom } from 'react-navigation'; // Version can be specified in package.json
class HomeScreen extends React.Component {
render() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Home!</Text>
@mauriciopazpp
mauriciopazpp / drawer.js
Created August 7, 2018 00:01
react-native drawer
import React from 'react';
import {createDrawerNavigator, DrawerItems} from 'react-navigation';
import Home from '../screens/Home';
import {Image} from "react-native";
import styles from '../styles/Drawer.style';
import Constants from '../constants/Constant';
import { Icon } from "react-native-elements";
const DrawerNav = createDrawerNavigator({
"Now Playing": {
@mauriciopazpp
mauriciopazpp / cordova_publis_play_store.md
Created November 5, 2018 16:15
Publish cordova app on Play Store

generate keytools file

keytool -genkey -v -keystore mnjic.keystore -alias mnjic -keyalg RSA -keysize 2048 -validity 10000

Sign app

cordova run android --release -- --keystore=mnjic.keystore --storePassword=abcd --alias=mnjic --password=abcd

this command above will generate same entries as below mentioned in build.json

review build.json

@mauriciopazpp
mauriciopazpp / update-windows-in-powershel.txt
Created November 15, 2018 01:41
Update windows and apps in Powershell
Install-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
@mauriciopazpp
mauriciopazpp / bash_terminal_colors.txt
Last active December 24, 2022 12:26
Bash terminal echo colors
An example is
Code:
echo "\033[1;31m Hello \033[0m"
The '31' and the '1' are the things you change. The '31' is the color code, and the '1' is where you put whatever you want to color. The rest of it is the same for every color coding; the beginning starts coloring, and the stuff afterwards stops coloring ('0' switches it back to default text color). You can use the following color codes:
Code:
30 - black
@mauriciopazpp
mauriciopazpp / docker.txt
Last active August 28, 2020 18:48
Comandos Docker.txt
Sincronizar id do usuáiro do container com o do computdor
sudo chown -R $(id -u):$(id -g) .
--> Mostrar todos os container executando
docker ps
--> Parar todos os containers
docker stop $(docker ps -a -q)
--> Executar bash de um container
@mauriciopazpp
mauriciopazpp / disable-cors-chrome
Last active August 28, 2020 18:47
disable cors chrome
MAC os
open -n -a "Google Chrome" --args --user-data-dir=/tmp/temp_chrome_user_data_dir http://localhost:8100/ --disable-web-security
@mauriciopazpp
mauriciopazpp / magento_url_rewrite.md
Last active April 2, 2019 19:39
Duplicate entries core_url_rewrite magento 1

How to find the duplicate entries:

select * from core_url_rewrite WHERE is_system <> 1 AND id_path REGEXP "^[0-9]+_[0-9]+$" AND (request_path REGEXP ".*-[0-9]*\.html" OR target_path = request_path)

Delete all the duplicate entries:

DELETE FROM core_url_rewrite 
WHERE is_system <> 1 AND id_path REGEXP "^[0-9]+_[0-9]+$" AND
      (request_path REGEXP ".*-[0-9]*\.html" 
          OR target_path = request_path)
@mauriciopazpp
mauriciopazpp / fix_history_zsh_problem.txt
Created April 2, 2019 22:29
How to fix history zsh - history terminal zsh not working
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
@mauriciopazpp
mauriciopazpp / gist:1ccd521b097e7c8c26bf84e0f3a33f9b
Created April 24, 2019 02:57
window switcher linux ubuntu
https://ulauncher.io/
https://github.com/beajeanm/ulauncher-windows-switcher