Skip to content

Instantly share code, notes, and snippets.

View pedrosfdcarneiro's full-sized avatar

Pedro Carneiro pedrosfdcarneiro

View GitHub Profile
@RobertAKARobin
RobertAKARobin / safari.md
Last active January 5, 2024 05:41
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

/*
* m1racle-poc: a basic proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program allows you to read and write the state of the s3_5_c15_c10_1 CPU register.
*
* Please visit m1racles.com for more information.
*
* Licensed under the MIT license.
*/
@prologic
prologic / LearnGoIn5mins.md
Last active April 30, 2024 15:10
Learn Go in ~5mins
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active April 19, 2024 16:34
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@atomtigerzoo
atomtigerzoo / virtualbox-with-shared-folder-for-node.md
Last active May 27, 2020 13:22
Virtualbox on Windows 7/Windows 10: Use npm/nodejs within a shared folder

Do not create a shared folder in settings/before - it will be created in step 3!

Enable symlinks for your VM

Open Windows PowerShell with adminstrator rights, enter:

$ VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1

Check if it got set:

$ VBoxManage getextradata YOURVMNAME enumerate

@koistya
koistya / DefaultLayout.jsx
Last active July 1, 2021 16:05
React.js (ReactJS) Page and Layout components. For a complete sample visit https://github.com/kriasoft/react-starter-kit and http://reactjs.kriasoft.com (demo)
/**
* Page layout, reused across multiple Page components
* @jsx React.DOM
*/
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var Navigation = require('../components/Navigation.jsx');
var DefaultLayout = React.createClass({
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 1, 2024 03:45
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@andradei
andradei / sb3_keybindings_vowels.json
Last active December 18, 2023 16:09
Sublime Text 3 Key Bindings for Vowals with Accent (use with keyboard layout US, International with Dead Keys and similar)
[
// Key remaps
// - a
{ "keys": ["alt + ' + a"], "command": "insert", "args": {"characters": "á"}},
{ "keys": ["alt + ` + a"], "command": "insert", "args": {"characters": "à"}},
{ "keys": ["alt + \" + a"], "command": "insert", "args": {"characters": "ä"}},
{ "keys": ["alt + ~ + a"], "command": "insert", "args": {"characters": "ã"}},
// - A