Skip to content

Instantly share code, notes, and snippets.

View bora89's full-sized avatar
💭
🧑‍💻 Have you digitised your business❓Tell me if you haven't!

Alex bora89

💭
🧑‍💻 Have you digitised your business❓Tell me if you haven't!
  • Digimation
  • Dubai, United Arab Emirates
View GitHub Profile
@bora89
bora89 / gist:002d12797b2b16428d893d68398cf572
Created March 13, 2017 12:54 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
/**
* Loads an app-script asynchronously.
*
* @param {String} filename Asset to load
* @see https://github.com/webpack/webpack/issues/118#issuecomment-28559053
* @see https://github.com/webpack/bundle-loader
*/
window.requireAsync = function requireAsync(filename) {
return new Promise((resolve,reject) => {
try {
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
array(
    'clientOptions'=>array(
        'validateOnSubmit'=>true, // Required to perform AJAX validation on form submit
        'afterValidate'=>'js:mySubmitFormFunction', // Your JS function to submit form
    ),
),

Go ahead and setup your Javascript function

var app = angular.module('plunker', ['ngSanitize']);
app.controller('MainCtrl', function($scope, $sce) {
$scope.trustSrc = function(src) {
return $sce.trustAsResourceUrl(src);
}
$scope.movie = {src:"http://www.youtube.com/embed/Lx7ycjC8qjE", title:"Egghead.io AngularJS Binding"};
});
http://maps.google.com/maps?saddr=START_ADD&daddr=DEST_ADD&ll=START_ADD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Audio test</title>
<script type="text/javascript">
/**
* @param {string} filename The name of the file WITHOUT ending
  • First install sublime text 3 from here http://www.sublimetext.com/3 or follow your own way you prefer (I did it with Linux mint Package manager).
  • Secondly, install package control from here https://packagecontrol.io/installation#st3 (instruction is clearly given in the website so I did not explain it much).
  • Third, open package control (Shortcut : Ctrl+Shift+P) and search for Package Control: Add Repository Now comes a region to enter URL at bottom part of sublime text 3 window. Enter https://raw.github.com/Grafikart/ST3-LiveReload/master/package.json. Again, open package control and search for Package Control: Install Package and then search for LiveReload in the upcoming window.
  • Configure LiveReload Package Setting at Preferences > Package Settings > LiveReload > Setting - Default and paste this :
{ 
  "enabled_plugins": 
    [
      "SimpleReloadPlugin",
 "SimpleRefresh"
app.filter('startsWithA', function () {
// function to invoke by Angular each time
// Angular passes in the `items` which is our Array
return function (items) {
// Create a new Array
var filtered = [];
// loop through existing Array
for (var i = 0; i < items.length; i++) {
var item = items[i];
// check if the individual Array element begins with `a` or not