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 puppeteer = require("puppeteer-core"); // v13.0.0 or later | |
const path = require("path"); | |
(async () => { | |
const browser = await puppeteer.launch({ | |
executablePath: | |
"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", | |
}); | |
const page = await browser.newPage(); | |
const timeout = 5000; |
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
/** | |
* These simple triggers are available in Sheets, Docs, and Forms | |
* Most of this information can be found: | |
* https://developers.google.com/apps-script/guides/triggers/events | |
*/ | |
function onOpen(e) { | |
// { | |
// authMode: 'LIMITED', | |
// source: 'Spreadsheet' || 'Document' || 'Form', | |
// user: 'User' |
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
$path = (Get-Location).Path | |
$FileExtension = ".mkv"; | |
$list = Get-ChildItem -Path $path -File | Where-Object {$_.extension -eq $FileExtension} | |
foreach ($file in $list) { | |
$filename = $file.name -replace "\[.*?\]", "" | |
$filename = ($filename -replace $FileExtension, "").Trim() | |
$filename2 = $filename -Split "-" | |
$filename3 = $filename2[0..($filename2.length - 2)] |
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
$path1 = "./dist"; | |
$path2 = "./dist2"; | |
$files = Get-ChildItem $path1 -recurse | |
$mainPath = Get-Location; | |
foreach ($file in $files) | |
{ | |
if ($file.PSIsContainer -eq $false) { | |
Set-Location $path1 |
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
<?php | |
class Test { | |
private $data = [ | |
'first' => 1, | |
'second' => 2, | |
'third' => 3, | |
'hundredTH' => 100, | |
'5Fifth' => 5 // following method rules, method never start with a digit, so this will return false | |
]; |
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
Get-AutomationVariable -Name 'resourceGroupName' | |
Get-AutomationVariable -Name 'omsWorkspaceId' | |
Get-AutomationVariable -Name 'omsPrimarySharedKey' | |
Get-AutomationVariable -Name 'searchServiceName' | |
Get-AutomationVariable -Name 'searchAdminKey' |
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
string azureLoginOauthUri = "https://login.microsoftonline.com/" + _tenantID + "/oauth2/token"; | |
string azureLoginResource = HttpUtility.UrlEncode(AuthenticationContextResource); | |
string azurePostBody = "grant_type=client_credentials&client_id=" + _applicationID + "&client_secret=" + _applicationSecret + "&resource=" + azureLoginResource; | |
HttpRequestMessage httpRequestMessage = new HttpRequestMessage() | |
{ | |
RequestUri = new Uri(azureLoginOauthUri), | |
Method = HttpMethod.Post, | |
Content = new StringContent(azurePostBody, Encoding.UTF8, "application/x-www-form-urlencoded"), | |
Headers = |
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
// This script only can be used at http://timepaz.com/EyeTest/ , just open console and copied this code | |
var _$ = jQuery; | |
var $div = _$('#box'); | |
var observer = new MutationObserver(function (mutations) { | |
mutations.forEach(function (mutation) { | |
if (mutation.attributeName === "class") { | |
const attributeValue = $(mutation.target).prop(mutation.attributeName); | |
const mapElem = {}; | |
const currentClass = ''; |
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
{"lastUpload":"2018-09-11T12:19:48.482Z","extensionVersion":"v3.1.2"} |
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
(function($){ | |
var currentCur = 'MYR'; | |
var tripsTable = $('#trips-table'); | |
var fareColHeader = tripsTable.find('thead tr th:nth-child(4)'); | |
var fareColHeaderSum = fareColHeader.find('.af-faresum'); | |
if ( fareColHeaderSum.length === 0 ){ | |
fareColHeaderSum = $('<span class="af-faresum">(<span class="af-faresumval">' + currentCur +'0.00</span>)</span>'); | |
} | |
fareColHeader.append(fareColHeaderSum); | |
var fareCol = tripsTable.find('tbody tr td:nth-child(4)'); |
NewerOlder