Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View devlim's full-sized avatar
💡
Githubing....

devlim devlim

💡
Githubing....
View GitHub Profile
@Jekis
Jekis / update-postman.sh
Last active March 5, 2019 07:43
Download and install the latest version of Postman for Ubuntu. Create .desktop file.
#!/bin/bash
INSTALL_DIR=/opt/postman
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root. Use sudo!"
exit 1
fi

First off, props to robmoggach for creating a script that attempts to do the job, however I'm working on a Meteor app that requires Mongo and found that the script wasn't setting everything up to completion. Here's an attempt to catalog all the steps I performed, in the hopes it might save someone a bit of headache someday:

1. Use the WebFaction web dashboard to provision your app directories

  • Log in, go to Domains/Websites > Applications, click to add a new application
  • Name this one for your Meteor app (for the rest of this doc let's use myapp as your moniker), e.g. myappmeteor
  • Change the app category to Custom, type to Custom websockets app (listening on port), check to open a port in the firewall
  • Save and note the port number you get (let's say it's 20000, you'll need this later)
  • Click to add a second application
  • Name this one for the Mong
@Jarred-Sumner
Jarred-Sumner / comcast.js
Last active September 7, 2022 01:30
Comcast injects this into webpages to show copyright notices
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
, comcastTimer: null
, xmlhttp: null
@paulirish
paulirish / what-forces-layout.md
Last active April 23, 2024 06:51
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ohanhi
ohanhi / frp.md
Last active December 23, 2022 13:06
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@jboner
jboner / latency.txt
Last active April 22, 2024 15:20
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@jaseemabid
jaseemabid / git tutorials.md
Last active March 24, 2024 00:07 — forked from netroy/git tutorials.md
Awesome git tutorials I am finding here and there
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh