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
Sublime Text - Shortcuts und Funktionen | |
/* | |
Sublime Spezifisches | |
*/ | |
CMD + , => User Prefs als JSON-String | |
CMD + SHIFT + P => Alle Optionen von Addons und Sublime Text | |
"pain" zum Installieren von Plugins |
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
<script type="text/javascript"> | |
jQuery(function($) { | |
// Timervariable für die setTimeout-Funktion | |
var timer; | |
/* Änderbare Daten: */ | |
// Klassennamen | |
var hoverBox = '.hoverBox'; |
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($) { | |
$.fn.gradientMe = function(opacity) { | |
if (typeof opacity == 'undefined') | |
opacity = 0.2; | |
if (typeof ColorThief != 'function') { | |
console.log('gradientMe(): ColorThief.js is missing!'); | |
return; |
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
// * zu String | |
var floatValue = 100.1; | |
var stringValue = floatValue + ''; | |
// String zu Zahl | |
var stringValueAsFloat = parseFloat(stringValue); | |
var stringValueAsInt = parseInt(stringValue, 10); | |
// Solche Werte können nicht direkt verwendet werden, einfach das Komma replacen | |
var deutschFormatierterString = "13,37"; |
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
/** | |
* hasNumber() | |
* Überprüft ob ein String eine Zahl enthält | |
* | |
* @type {String} str | |
* @return {boolean} | |
*/ | |
function hasNumber(str) { | |
var regex = /\d/; |
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($) { | |
$.fn.ffAccordion = function(options) { | |
if (typeof options == 'undefined') | |
options = {}; | |
options = { | |
childSelector: options.childSelector || 'li', | |
subMenuSelector: options.subMenuSelector || 'ul', |
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
<?php | |
$filename = 'mein-export.csv'; | |
$content = '1,2,3,4,5'; | |
// Header setzen | |
header("Pragma: public"); | |
header("Expires: 0"); | |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); | |
header("Cache-Control: private", false); |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"draw_minimap_border": true, | |
"draw_white_space": "all", | |
"font_face": "SourceCodePro-Regular", | |
"font_size": 11, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": |
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
app.directive('ngEnter', function() { | |
return function(scope, element, attrs) { | |
element.bind('keydown keypress', function(event) { | |
if (event.which !== 13) | |
return; | |
scope.$apply(function() { | |
scope.$eval(attrs.ngEnter); | |
}); | |
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
app.directive('ngrChange', function() { | |
return { | |
require: 'ngModel', | |
link: function (scope, element, attrs) { | |
var valueBefore = element.val(); | |
element.bind('focus', function() { | |
if (valueBefore !== element.val()) | |
valueBefore = element.val(); | |
}); |
OlderNewer