Node.js Install npm globally if you don’t already have it (check versions with node -v and npm -v) Run npm init command to initialize the package.json file to provide information about the project and help manage the dependencies… example… { “name”: “my_project”, “version”: “0.0.0”, “devDependencies”: { “gulp”: “~3.8.8” }, “dependencies”: { “jquery”: “~2.1.3”, “react”: “~0.13.1” } } devDependencies: These are […]
Chrome extension is just some HTML, CSS and JavaScript that allows you to add some functionality to Chrome through some of the JavaScript APIs Chrome exposes. An extension is basically just a web page that is hosted within Chrome and can access some additional APIs Browser Action extension is a basic Chrome extension manifest.json … […]
Commands & Notes git add <FILENAME> to add a single file or git add . to add all files to staging git commit -m “MESSAGE” to commit in one step without entering editor mode Git history commands: git log git log –pretty=oneline git log –pretty=oneline –max-count=2 git log –pretty=oneline –since=’5 minutes ago’ git log –pretty=oneline […]
Change Default Listening Port Go to MAMP > Preferences > Ports and set Apache Port to be 80. Set up Localhosts in Hosts File Edit your hosts file so that you have some domains that will resolve to your local web server… sudo pico /etc/hosts Add the domains you want to resolve to your localhost… 127.0.0.1 […]
A powerful API to store and sync data in realtime. Steps Install <script src=’https://cdn.firebase.com/js/client/2.2.1/firebase.js’></script> Reference (URL for your Firebase data) var myDataRef = new Firebase(‘https://xze3eg07ah9.firebaseio-demo.com/’); Write data with .set() method on a Firebase reference (write an object too) – myDataRef.set({name: name, text: text}); … In this example, when the object {name: name, text: text} is set, […]
Google provides the ability to script spreadsheets via JavaScript and their library’s methods. Tools > Script editor… function DOUBLE(input) { return input * 2; // EXAMPLE … =DOUBLE(A2) }
dp (Density Independent Pixels): is a measure of screen size dpi (Dots per Inch): is a measure of screen density iOS non-Retina to Retina display transition (163ppi to 326ppi) Size buckets are phone (smaller than 600dp) and tablet (larger than or equal 600dp) Density buckets for Android are LDPI, MDPI, HDPI, XHDPI, XXHDPI, and XXXHDPI ldpi: Resources for low-density […]
<iframe src=”http://jsfiddle.net/USERNAME/FIDDLE/embedded/result,resources,html,css,js” width=”100%” height=”300″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Sublime Text 2 Xcode Install and launch XCode from the App Store Press ⌘ + , to open the preferences pane Click the Downloads tab and then the install button next to “Command Line Tools” Git (https://help.github.com/articles/set-up-git) PIP sudo easy_install pip Node Fabric sudo pip install fabric Dropbox ImageOptim Jing MAMP Spectacle Photoshop VirtualBox PhoneGap
ctrl + u erases entire line ctrl + c quits a binary execution and gets you back to the prompt
You can view an object’s bound events in the console with… $._data( $(‘.element’)[0], ‘events’ );
You must do a right-click “Save As…” for saving to work locally. Then, subsequent edits may be saved with just “Save” or the keyboard shortcut https://developers.google.com/chrome-developer-tools/docs/authoring-development-workflow#save-as
Create .htaccess and .htpasswd files in the folder One username and password per line, separated by a colon Make sure to set the right privileges to the files so Apache can use them chmod 0644 .htaccess chmod 0644 .htpasswd .htaccess File AuthType Basic AuthName “restricted area” AuthUserFile /home6/path/to/the/directory/you/are/protecting/.htpasswd require valid-user .htpasswd File username:encryptedPassword Resources Password Generator
Install the Grunt command line tool (requires node.js installed on your machine)… sudo npm install grunt-cli -g Create package.json in root of project (list of Grunt plugin dependencies) npm install (install the dependencies) Create Gruntfile.js in root of project (configuration) Basically, you need three different functions to work with Grunt: grunt.initConfig, grunt.loadNpmTasks, and grunt.registerTask Resources Grunt: A Build Tool […]
Shift + Cmd + L adds multiple cursors to the page Cmd + D selects additional occurrences of current selection Ctrl + Cmd + G selects ALL occurrences of current selection Ctrl + Cmd + U + S shows the SFTP activity panel (SFTP package required)