This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// Check if the script is already loaded | |
if (document.getElementById("mrh-proxy-script")) { | |
console.log("Script already loaded, skipping..."); | |
return; | |
} | |
// Add a float button to the page to show that the script is running | |
var floatButton = document.createElement("div"); | |
floatButton.style.position = "fixed"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
import os | |
import re | |
class ImportChildModulesCommand(sublime_plugin.TextCommand): | |
def replace_module_name(self, m): | |
return m.group(2).upper() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to key binding { "keys": ["ctrl+1"], "command": "require_js_files"} | |
import sublime | |
import sublime_plugin | |
import os | |
class RequireJsFilesCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
current_folder = os.path.dirname(self.view.file_name()) | |
current_file_name = os.path.basename(self.view.file_name()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = { | |
b: { | |
c: { | |
d: { | |
e: 'text 1' | |
} | |
} | |
}, | |
f: 'text' | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://country.io/iso3.json | |
{ | |
BD: "BGD", | |
BE: "BEL", | |
BF: "BFA", | |
BG: "BGR", | |
BA: "BIH", | |
BB: "BRB", | |
WF: "WLF", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fd = new FormData(); | |
fd.append('file', vm.selectedLogo); | |
Restangular.one('/api/admin/settings/logo') | |
.withHttpConfig({transformRequest: angular.identity}) | |
.customPOST(fd, '', undefined, {'Content-Type': undefined}) | |
.then(function() { | |
getLogo(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["C:\\Users\\Thach Nguyen\\build.bat"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
/** | |
* @desc Direictive to embed facebook post | |
* @example <fb-post-preview data-href="vm.postUrl"></fb-post-preview> | |
*/ | |
angular | |
.module('fbDirective') | |
.directive('fbPostPreview', fbPostPreview); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global EXIF */ | |
'use strict'; | |
// Require library: https://github.com/jseidelin/exif-js | |
// Require Jquery (If not have jquery you must handle DOM by native js code) | |
/** | |
@description this directive auto rotate image by css base on image orientation value | |
Check the example of image orientation here: | |
https://github.com/recurser/exif-orientation-examples | |
@example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileOverview | |
* @author <a href="mailto:[email protected]">Oleg Varaksin</a> | |
* @version 0.2 | |
*/ | |
/** | |
* Whiteboard designer class for element drawing. | |
* @class | |
* @param witeboardConfig whiteboard's configuration {@link WhiteboardConfig} |
NewerOlder