Skip to content

Instantly share code, notes, and snippets.

View brunolm's full-sized avatar
🏠
Working from home

BrunoLM brunolm

🏠
Working from home
View GitHub Profile
@brunolm
brunolm / Header.js
Last active August 13, 2017 21:08
react-native test example with jest
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text } from 'react-native';
export default class Header extends Component {
static propTypes = {
user: PropTypes.object,
}
render() {
return (
@brunolm
brunolm / index.ts
Last active November 6, 2017 10:49
React Redux - Action creator (prototype)
/* Prototype
- Trying to make return type of Creators include the property TYPE
*/
function createActions<T>(obj: T) {
const keys = Object.keys(obj);
return {
Creators: keys.reduce((creators, key) => {
creators[key] = (...args) => ({ type: key, ...obj[key](...args) });
return creators;
@brunolm
brunolm / test.md
Last active November 5, 2020 02:15
aaaaaaa yo

foo bar

@brunolm
brunolm / base64-image.ps1
Created November 23, 2018 18:22
Powershell: Get-ImageBase64 from FILE or URL
function Get-ImageBase64([string]$file) {
if ($file -like 'http*') {
return Get-ImageBase64FromUrl($file);
}
return Get-ImageBase64FromFile($file);
}
function Get-ImageBase64FromFile(
[string]
@brunolm
brunolm / .eslintrc
Last active April 7, 2021 21:20
.eslintrc (PascalCase for react)
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
@brunolm
brunolm / voicecommands.ahk
Created November 11, 2023 01:33
Windows Copilot commanded by voice (Cortana) WIN+F1 to toggle
#Persistent
#SingleInstance, Force
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
SetMouseDelay, -1
; Voice Command state
toggle := false
Menu, Tray, Icon, %A_ScriptDir%\IconFalse.ico