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
DELIMITER $$ | |
DROP TABLE IF EXISTS _partitioned_tables; $$ | |
CREATE TABLE IF NOT EXISTS `_partitioned_tables` ( | |
`owner_name` VARCHAR(100) NOT NULL, | |
`table_name` VARCHAR(100) NOT NULL, | |
`column_name` VARCHAR(100) NOT NULL, | |
`mode` ENUM('day', 'month'), | |
`future_partitions` INT NOT NULL, |
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
class LZRW1 { | |
static #FLAG_BYTES = 4; | |
static #FLAG_COMPRESS = 0; | |
static #FLAG_COPY = 1; | |
static #WORK_MEM_ALLOC = 4 * 4096 + 3; | |
static #WORKMEM = new Array(LZRW1.#WORK_MEM_ALLOC); | |
/** @returns {Buffer} */ | |
static compress(/**@type Buffer*/input) { | |
const WORKMEM = this.#WORKMEM.fill(0); |
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
(() => { | |
// Run this in Chrome's console, while in Bitbucket's website and logged in | |
const csrftoken = document.cookie.match(/\bcsrftoken=(.*?)(?:;| |$)/)[1]; | |
const repoName = window.__initial_state__.section.repository.currentRepository.full_name; | |
const expiry = 1000 * 60 * 60; // Delete only files older than an hour | |
let page = 1; | |
function iterateNext() { | |
fetch(`https://bitbucket.org/${repoName}/admin/lfs/file-management/?iframe=true&spa=0&page=${page}`, { |
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
--- a/deps/v8/include/v8.h | |
+++ b/deps/v8/include/v8.h | |
@@ -1564,9 +1564,10 @@ class V8_EXPORT ScriptCompiler { | |
}; | |
enum CompileOptions { | |
- kNoCompileOptions = 0, | |
- kConsumeCodeCache, | |
- kEagerCompile | |
+ kNoCompileOptions = 0x00, |
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
--- a/deps/v8/include/v8.h | |
+++ b/deps/v8/include/v8.h | |
@@ -1449,12 +1449,13 @@ class V8_EXPORT ScriptCompiler { | |
enum CompileOptions { | |
kNoCompileOptions = 0, | |
- kProduceParserCache, | |
- kConsumeParserCache, | |
- kProduceCodeCache, | |
- kProduceFullCodeCache, |
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
import React, { Component } from 'react'; | |
import { View, StyleSheet, Text, Image } from 'react-native'; | |
import PropTypes from 'prop-types'; | |
import { TouchableNativeFeedback } from 'react-native'; | |
export default class CalloutView extends Component { | |
static propTypes = { | |
onPress: PropTypes.func, | |
parentLayout: PropTypes.any, |
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 getLowestIpRanges(ips) { | |
let ipRanges = []; | |
ips.forEach(x => { | |
let x3 = x.replace(/\d+$/, ''); | |
let x2 = x3.replace(/\d+\.?$/, ''); | |
let x1 = x2.replace(/\d+\.?$/, ''); | |
let ex = ipRanges.filter(y => y == x3 + '0' || y == x2 + '0.0' || y == x1 + '0.0.0'); | |
if (ex.length) return; |
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 CssMinifier = (function () { | |
function unescapeString(value) { | |
// CSS RFC states that the escape character (\) escapes every character to itself, | |
// except for a variable length hex-digit sequence that is converted to a character by that hex value. | |
// An escaped hex value can be ended with an optional whitespace ( \t\n). | |
var out = ''; | |
var quoted = false; | |
var hexEscapeSeq = ''; |
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 SESSION group_concat_max_len = 99999999999; | |
SET @old_schema_name = 'old_schema'; | |
SET @new_schema_name = 'new_schema'; | |
SELECT GROUP_CONCAT(statement SEPARATOR '') | |
FROM ( | |
SELECT 'DELIMITER $$\n\n' AS statement | |
UNION ALL | |
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 getDistantBrightnessColor = (function () { | |
// Calculate grayscale color (luma) according to ITU-R Recommendation BT. 709 | |
var grayscaleLuma709Color = function(color) { | |
return Math.round(0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b) | |
}; | |
var linearDiffColor = function(color1, color2) { | |
return Math.abs(color1.r - color2.r) + | |
Math.abs(color1.g - color2.g) + |
NewerOlder