Skip to content

Instantly share code, notes, and snippets.

View thoughtpalette's full-sized avatar

Christopher Marshall thoughtpalette

View GitHub Profile
@thoughtpalette
thoughtpalette / reset.css
Created December 31, 2022 03:13
Josh's Custom Reset - Modern CSS Reset
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
@cdrini
cdrini / index.md
Last active September 19, 2023 22:55
Adding lodash type hinting to monaco using addExtraLib

Well that was a headache! This is certainly not an elegant solution, but it works. Hopefully someone can use these notes to save themselves a bunch of time.

Known issues:

  • This does not scale easily to any other library
  • Requires some internal knowledge of lodash's types library which might break on a lodash update

Add raw-loader and @types/lodash

npm install --save-dev @types/lodash raw-loader
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@lopspower
lopspower / README.md
Last active May 3, 2024 13:26
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@peterjmag
peterjmag / react-native-talk.md
Last active June 21, 2021 10:13
Let's build a React Native app in 20 minutes - React Berlin #1 (April 2015)
@vintesh
vintesh / Twilio SMS Send - RAW AJAX or POST REQUEST
Last active April 24, 2020 16:53
Twilio - SMS - How To - POST - jQuery - Javascript - Using AJAX/POST
$.ajax({
type: "POST",
username: "ACCOUNT_SID",
password: "AUTH_TOKEN",
url: "https://api.twilio.com/2010-04-01/Accounts/[ACCOUNT_SID]/Messages.json",
data: {
"To" : "+911234567890",
"From" : "+11234567890",
"Body" : "From jQuery AJAX"
},
@auser
auser / app.js
Last active January 26, 2021 01:59
angular.module('myApp',
['ngRoute', 'myApp.services', 'myApp.directives']
)
.config(function(AWSServiceProvider) {
AWSServiceProvider.setArn('arn:aws:iam::<ACCOUNT_ID>:role/google-web-role');
})
.config(function(StripeServiceProvider) {
StripeServiceProvider.setPublishableKey('pk_test_YOURKEY');
})
.config(function($routeProvider) {
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@thegrubbsian
thegrubbsian / deploy.rake
Created June 13, 2012 17:22
Heroku Deploy Rake Task
namespace :deploy do
HEROKU_ACCOUNT = "account_name"
MAINLINE_BRANCH = "master"
STAGING_REPO = "app-name-staging"
PRODUCTION_REPO = "app-name-production"
def make_git_timestamp
"#{@env}-deploy-#{Time.now.to_s.gsub(/:/, "-").gsub(/\s/, "-").gsub(/--/, "-")}"
end