http://www.commongrounds.co.uk/Library/lib/python2.7/site-packages/mysql/utilities/common/?DA
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
| #!/usr/bin/env bash | |
| { | |
| set -euo pipefail | |
| # --- Re-run inside WSL when invoked from Windows shells --- | |
| if [[ -z "${WSL_INTEROP-}" && -z "${WSL_DISTRO_NAME-}" ]]; then | |
| exec wsl -d Ubuntu-24.04 -- /bin/bash -lc "aijail $*" | |
| fi | |
| # --- Verify HOME (we bindmount a bunch of $HOME paths) --- |
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
| // based on https://stackoverflow.com/a/56678483/65387 | |
| type RGB = [r: number, g: number, b: number] | |
| const UNK = 255 / 2 | |
| /** | |
| * @param hex RGB hex string like "#CCCFDB" | |
| * @returns RGB tuple in [0-255] | |
| */ |
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
| /* ***** BEGIN LICENSE BLOCK ***** | |
| * Distributed under the BSD license: | |
| * | |
| * Copyright (c) 2010, Ajax.org B.V. | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * * Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. |
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
| import {useMemo, useRef} from 'react' | |
| import {useBoundingBox} from '../hooks/useBoundingBox' | |
| import {sortBy} from 'lodash-es' | |
| interface Size { | |
| width: number | |
| height: number | |
| } | |
| interface SrcItem extends Size { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Location to Timezone</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.0.0/normalize.min.css"> | |
| <script src="https://code.jquery.com/jquery-2.2.3.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/0.11.0/fetch.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.10.0/lodash.min.js"></script> | |
| <style> |
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
| { | |
| "license": "UNLICENSED", | |
| "dependencies": { | |
| "fastify": "^3.9.2", | |
| "fastify-cookie": "^5.1.0", | |
| "fastify-sensible": "^3.1.0", | |
| "google-auth-library": "^6.1.3", | |
| "lodash": "^4.17.20", | |
| "pug": "^3.0.0", | |
| "pug-runtime": "^3.0.0" |
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 | |
| function substr_startswith($haystack, $needle) { | |
| return substr($haystack, 0, strlen($needle)) === $needle; | |
| } | |
| function preg_match_startswith($haystack, $needle) { | |
| return preg_match('~' . preg_quote($needle, '~') . '~A', $haystack) > 0; | |
| } |
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
| const checkOffset = $.datepicker._checkOffset; | |
| $.extend($.datepicker, { | |
| _checkOffset: function(inst, offset, isFixed) { | |
| if(!isFixed) { | |
| return checkOffset.apply(this, arguments); | |
| } | |
| let isRTL = this._get(inst, "isRTL"); | |
| let obj = inst.input[0]; |
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
| var webdriver = require('selenium-webdriver'); | |
| var fs = require('fs'); | |
| var driver = new webdriver.Builder().build(); | |
| webdriver.WebDriver.prototype.saveScreenshot = function(filename) { | |
| return driver.takeScreenshot().then(function(data) { | |
| fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) { | |
| if(err) throw err; | |
| }); |
NewerOlder