Skip to content

Instantly share code, notes, and snippets.

View vspedr's full-sized avatar

Victor vspedr

  • Campinas, Brazil
View GitHub Profile
@greew
greew / README.md
Last active July 29, 2023 16:50
Fix Spotify stuck in full screen (Ubuntu) installed from snap

Problem: I experienced Spotify being stuck in full screen mode. The title bar with minimize, maximize and close wasn't present and no keyboard shortcut I know about would exit full screen.

Solution:

@mastier has improved the solution - see here

Solution (old):

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@cereallarceny
cereallarceny / index.js
Last active May 2, 2023 06:41
Server-side rendering in Create React App
const md5File = require('md5-file');
const path = require('path');
// CSS styles will be imported on load and that complicates matters... ignore those bad boys!
const ignoreStyles = require('ignore-styles');
const register = ignoreStyles.default;
// We also want to ignore all image requests
// When running locally these will load from a standard import
// When running on the server, we want to load via their hashed version in the build folder
@vxhviet
vxhviet / simplifiedGitFlow.md
Last active August 11, 2023 18:31
A simplified version of Git Flow

Simplified Git-flow

                        RELEASE TAG
o----------------------------o-----------------o------------o------> MASTER
 \                          /  \                \----------/ HOTFIX
  \                        /    \                          \
   \----------------------/      \--------------------o-----o------> DEVELOP
                                  \                  /
 \----------------/ FEATURE
const log = new Proxy({}, {
get: (_, colour) => function() {
console.log(`%c ${[].slice.call(arguments).join(' ')}`, `color: ${colour}`)
}
})
// example
log.tomato('I am tomato')
log.chocolate('I am chocolate')
log.cornflowerblue('I am cornflowerblue')
@automagicaly
automagicaly / .bashrc
Last active September 5, 2018 20:09
git branch on command line
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
#############################################
# Functions
#############################################
get_git_branch(){
@catchin
catchin / MultilineTextInput.js
Last active July 31, 2018 04:07
This is a workaround for the buggy react-native TextInput multiline on Android. Inspired by the comments on https://github.com/facebook/react-native/issues/12717.
import React, {PropTypes, PureComponent} from 'react';
import {TextInput} from 'react-native';
import debounce from 'debounce';
/**
* This is a workaround for the buggy react-native TextInput multiline on Android.
*
* Can be removed once https://github.com/facebook/react-native/issues/12717
* is fixed.
*
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active April 11, 2024 15:02
React Native Bridging Cheatsheet
const path = require('path');
const fs = require('fs');
const express = require('express');
const React = require('react');
const App = require('./transpiled/App.js').default;
const { renderToString } = require('react-dom/server');
const server = express();
server.get('/', (req, res) => {

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?