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
s = s.replace(/\\n/g, "\\n") | |
.replace(/\\'/g, "\\'") | |
.replace(/\\"/g, '\\"') | |
.replace(/\\&/g, "\\&") | |
.replace(/\\r/g, "\\r") | |
.replace(/\\t/g, "\\t") | |
.replace(/\\b/g, "\\b") | |
.replace(/\\f/g, "\\f"); | |
// remove non-printable and other non-valid JSON chars | |
s = s.replace(/[\u0000-\u0019]+/g, ""); |
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
line 164 | |
view.add_regions(region_key, error_regions, "sublimelinter.underline.illegal", "dot",sublime.DRAW_SQUIGGLY_UNDERLINE) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ACPI</key> | |
<dict> | |
<key>SortedOrder-Comment</key> | |
<string>This is the original order supported by Clover prior to build v3062. You can trim it as necessary.</string> | |
<key>SortedOrder</key> | |
<array> |
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
capitalize(value) { | |
return value.toLowerCase().replace( /\b\w/g, function (m) { | |
return m.toUpperCase(); | |
}); | |
} |
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
@ViewChild('rootTabs') tabRef:Tabs; | |
function emailValidator(control) { | |
var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i; | |
if (!EMAIL_REGEXP.test(control.value)) { | |
return {email: true}; | |
} | |
} |
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
bcdedit /set hypervisorlaunchtype off | |
bcdedit /set hypervisorlaunchtype auto |
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
SET "sourceDir=F:\workspace\build\IOS" | |
SET "destinationDir=D:\mac\share\IOS" | |
del "%sourceDir%\Libraries\libiPhone-lib.a" | |
for /d %%I in ("%destinationDir%\*") do ( | |
if /i not "%%~nxI" equ "Libraries" rmdir /q /s "%%~I" | |
) | |
for /d %%I in ("%destinationDir%\Libraries\*") do ( |
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
const uint EVENT_SYSTEM_END = 0x00FF; | |
const uint EVENT_MIN = 0x00000001; | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
if (windowEventHook == IntPtr.Zero) | |
{ | |
var threadId = 0; | |
var processId = Process.GetCurrentProcess().Id; | |
windowEventHook = SetWinEventHook( |
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
var regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/ | |
minutesFromIsoDuration = function(duration) { | |
var matches = duration.match(regex); | |
return parseFloat(matches[14]) || 0; | |
} | |
function youtube_parser(url) { | |
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; |
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
//angular 1x | |
app.angular.module('myApp', ['']); | |
app.controller('AppController', ['$scope', function($scope) { | |
}]); | |
app.service('DownloadService', ['$rootScope', function($rootScope) { | |
}]); |