Skip to content

Instantly share code, notes, and snippets.

View rubencodes's full-sized avatar

Ruben Martinez Jr. rubencodes

View GitHub Profile
@acdlite
acdlite / app.js
Last active January 20, 2023 08:23
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
@JoeKeikun
JoeKeikun / input_cursor_color
Last active June 7, 2022 12:08
How to change <input> input cursor color by css (webkit)
When I developed an app for ios by phonegap, I had a trouble in changing the <input> input cursor color.
but now, there is a solution for it:
---------------
<style>
input {
color: rgb(60, 0, 248); /* change [input cursor color] by this*/
text-shadow: 0px 0px 0px #D60B0B; /* change [input font] by this*/
-webkit-text-fill-color: transparent;
@jameshartig
jameshartig / gist:772316
Created January 10, 2011 03:41
Count how many Google Voice text messages you've sent
/*
This is assuming you don't delete text messages. This only counts the amount of text messages you have not deleted.
This may take 5 minutes or so, depending on your computer speed and how many text messages you have.
Instructions:
Visit: https://www.google.com/voice/b/0#sms/ and wait for the page to fully load.
Paste this into your Javavscript console, wait it stops and look at the last count.