This file contains 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
FROM ... | |
ARG GITHUB_TOKEN # GITHUB_TOKEN is only defined for build stage! https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line | |
RUN apk add git # This might contain more system packages depending on what is about to be installed by NPM | |
RUN git config --global url."https://${GITHUB_TOKEN}:[email protected]".insteadOf ssh://[email protected] # Force NPM to use https://${GITHUB_TOKEN}:[email protected]/<user name>/<repository>.git for modules installed from GitHub | |
COPY package.json /package.json | |
This file contains 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
# Adjust Docker Machine Memory+CPU | |
# http://stackoverflow.com/questions/32834082/how-to-increase-docker-machine-memory-mac | |
docker-machine stop | |
VBoxManage modifyvm default --cpus 2 | |
VBoxManage modifyvm default --memory 4096 | |
docker-machine start |
This file contains 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
0.12 |
This file contains 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
# Save this file | |
# mac - "~/Library/Application Support/Sublime Text 3/Packages/" | |
# linux - "~/.config/sublime-text-3/Packages/" | |
# NOTE! | |
# ~/.nvm/alias/default must contain full version name. | |
# $ nvm alias default v4.3.5 | |
import os |
This file contains 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
app.run(['$templateCache', function ($templateCache) { | |
/** | |
* Cached Angular Template for ui-grid/uiSelect. | |
* Allows to use in ui-grid as 'editableCellTemplate' field definition | |
*/ | |
$templateCache.put('ui-grid/uiSelect', | |
'<ui-select-grid-cell-wrap>' + | |
'<ui-select ng-model="MODEL_COL_FIELD" theme="selectize" ng-disabled="disabled" append-to-body="true">' + | |
'<ui-select-match placeholder="Choose...">{{ $select.selected[editDropdownValueLabel] }}</ui-select-match>' + |
This file contains 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
class dashboardCtrl | |
NOTIFICATIONS_STATUS_UPDATE_PERIOD = 30 # Seconds | |
@$inject = ['$scope', '$q', '$log', '$cookies', '$state', '$rootScope', '$timeout', 'MonitoringService', | |
'loginService', 'SettingsService'] | |
_s = {} | |
scheduleAgentDataUpdate = () -> |
This file contains 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
/** | |
* Determine if SSL is used. | |
* | |
* @since 2.6.0 | |
* | |
* @return bool True if SSL, false if not used. | |
*/ | |
function is_ssl() { | |
if ( isset($_SERVER['HTTPS']) ) { | |
if ( 'on' == strtolower($_SERVER['HTTPS']) ) |
This file contains 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
Setting the BODY's background to the average color in the following image: | |
<br/><br/> | |
<img id="i" src="data:image/jpeg;base64,/9j/7gAOQWRvYmUAZAAAAA........Q==" /> |
This file contains 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
#Color text change | |
rgb = [ | |
"255" | |
"0" | |
"0" | |
] | |
setInterval (-> | |
c = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")" | |
#http://www.w3.org/TR/AERT#color-contrast |
This file contains 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
<script type="text/javascript"> | |
document.ondragstart = noselect; | |
document.onselectstart = noselect; | |
document.oncontextmenu = noselect; | |
function noselect() {return false;} | |
</script> |
NewerOlder