Skip to content

Instantly share code, notes, and snippets.


devlim devlim

View GitHub Profile
davejamesmiller /
Last active Feb 27, 2021
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

Jekis /
Last active Mar 5, 2019
Download and install the latest version of Postman for Ubuntu. Create .desktop file.
if [ "$(whoami)" != "root" ]
echo "Sorry, you are not root. Use sudo!"
exit 1

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 / comcast.js
Last active Dec 6, 2019
Comcast injects this into webpages to show copyright notices
View comcast.js
// 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/'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
, comcastTimer: null
, xmlhttp: null
paulirish /
Last active Mar 6, 2021
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 /
Last active Feb 22, 2021
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 /
Last active Mar 5, 2021
The introduction to Reactive Programming you've been missing
LeCoupa / nodejs-cheatsheet.js
Last active Mar 4, 2021
Complete Node.js CheatSheet --> UPDATED VERSION -->
View nodejs-cheatsheet.js
/* *******************************************************************************************
* ******************************************************************************************* */
// 0. Synopsis.
jboner / latency.txt
Last active Mar 6, 2021
Latency Numbers Every Programmer Should Know
View latency.txt
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 / git
Last active Mar 3, 2021 — forked from netroy/git
Awesome git tutorials I am finding here and there
View git