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
#Requires AutoHotkey v2.0- | |
#SingleInstance Force | |
DEFAULT_VOLUME := 30 | |
; Single press - mute, unmute. Double press - unmute and default volume. | |
#F1:: { | |
static winf1_presses := 0 | |
if winf1_presses > 0 { ; Timer already started. | |
winf1_presses += 1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link rel="stylesheet" type="text/css" href="./styles.css"> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<p> Close the window and check the console output. </p> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'"> | |
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'"> | |
<title>openPath error dialog minimized</title> | |
</head> | |
<body> |
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
/** | |
* JS remove HTML/XML attribure regexp. | |
*/ | |
function removeAttribute(html, tagName, attrName) { | |
return html.replace(new RegExp(`(<${tagName}.*?)\\s+${attrName}=(["']).*?\\2(.*?>)`, 'gmi'), '$1$3'); | |
} |
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
# Copyright 2014 Google Inc. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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 googleapiclient.http import HttpRequest | |
class HttpRequestWithRetry(HttpRequest): | |
"""googleapiclient HttpRequest with default num_retries. | |
Google REST API HTTP 500 error is flood protection and the request should be retried with an exponential backoff. | |
The execute(num_retries) already implements it. | |
This class is just a simplification to not need to specify num_retries for every execute call. |
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
using System; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Windows.Interop; | |
using WPFMediaKit.DirectShow.Controls; | |
using WPFMediaKit.DirectShow.MediaPlayers; | |
namespace Test_Application | |
{ |
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
<!-- Especially usefull when placed inside Window and ScrollViewer --> | |
<myc:IgnoreWidthControl> | |
<TextBlock Text="Very long text which has to be wrapped. Yeah, it must be wrapped." TextWrapping="Wrap" /> | |
</myc:IgnoreWidthControl> |
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
#!/bin/bash | |
## | |
## Creates explicit dirs on the bucket | |
## | |
function print_help() { | |
echo "Usage:" $(basename $0) bucket_mounted_dir | |
exit 1 | |
} |
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
namespace Helpers | |
{ | |
public static class DapperSelectColumns | |
{ | |
/// <summary> | |
/// Hack to string for select statement for the given ORM type. | |
/// </summary> | |
/// <param name="ormType"></param> | |
public static string SelectClause(Type ormType, string alias) | |
{ |
NewerOlder