Skip to content

Instantly share code, notes, and snippets.

@azat-co
azat-co / JSFUN.md
Last active February 7, 2020 12:22
JavaScript FUNdamentals

JS FUNdamentals

If it's not fun, it's not JavaScript.

Expressiveness

Programming languages like BASIC, Python, C has boring machine-like nature which requires developers to write extra code that's not directly related to the solution itself. Think about line numbers in BASIC or interfaces, classes and patterns in Java.

On the other hand JavaScript inherits the best traits of pure mathematics, LISP, C# which lead to a great deal of expressiveness (and fun!).

'use strict';
/* jasmine specs for controllers go here */
/* Define all the services and controllers module, so they are accessable in your it's
*/
describe('controllers', function(){
beforeEach(function(){
module('cotd.controllers');
module('cotd.services');
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@addyosmani
addyosmani / pubsub.md
Created October 28, 2011 06:49
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here:

@toddb
toddb / build-tasks.ps1
Created August 9, 2011 06:34
Build tasks for powershell via psake
<#
Basic build tasks for SharePoint (or other projects) - using 7zip and GacUtil
$framework = '4.0x64'
. .\scripts\build-tasks.ps1
properties {
$project = "Sites"