Skip to content

Instantly share code, notes, and snippets.

diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
@nickolasburr
nickolasburr / alphanum
Created December 1, 2017 21:23
Generate pseudo-random alphanumeric string of n characters.
#!/usr/bin/env bash
###
### alphanum: Generate pseudo-random alphanumeric string of n characters.
###
LC_CTYPE=C tr -dc A-Za-z0-9 < /dev/urandom | head -c $1 | xargs ;
@nickolasburr
nickolasburr / prsg
Created December 1, 2017 20:46
Generate pseudo-random string of n characters.
#!/usr/bin/env bash
###
### prsg: Generate pseudo-random string of n characters.
###
if [[ $# -eq 0 ]]; then
printf 'Usage: prsg LENGTH\n'
exit 1
@nickolasburr
nickolasburr / extract
Last active December 1, 2017 03:15
Extract various archive types.
#!/usr/bin/env bash
###
### extract: Utility for extracting various archive types.
###
shopt -s extglob
USAGE="Usage: extract FILE [FILE] ..."
@nickolasburr
nickolasburr / in_array.c
Created August 5, 2017 17:40
Check if a string exists in an array.
#include <string.h>
/**
* Check if a string exists in an array.
*/
int in_array (const char* const str, const char *arr[], size_t size) {
int i;
for (i = 0; i < size; i += 1) {
if (!strcmp(arr[i], str)) {
@nickolasburr
nickolasburr / .scrc
Created July 12, 2017 16:32
Personal ~/.scrc file
set color
set craction = 1
set numeric
set !optimize
@nickolasburr
nickolasburr / .avrduderc
Created June 20, 2017 00:43
~/.avrduderc configuration file
default_programmer = "arduino";
default_serial = "/dev/tty.usbmodemFD121";
programmer
id = "arduino";
desc = "Arduino Uno";
type = "arduino";
connection_type = serial;
baudrate = 9600;
;
@nickolasburr
nickolasburr / target.js
Last active July 15, 2017 17:32
Use CSS selectors in fragment identifiers to anchor a webpage on an arbitrary element.
(function () {
'use strict';
// queryTarget hash delimiter
var HASH_DELIM = '#::';
/**
* @ref https://gist.github.com/nickolasburr/9ebee93c0ac155cc25d54eaf44952a0e
*/
@nickolasburr
nickolasburr / clip.sh
Created June 6, 2017 15:54
clip: Delete local branch, with option to force delete unmerged branches
#!/usr/bin/env bash
# clip: Delete local branch, with option to force delete unmerged branches
clip () {
# return if we're not inside an actual work tree
if [[ ! "$(git rev-parse --is-inside-work-tree)" ]] 2>/dev/null; then
echo "fatal: Not a git repository (or any of the parent directories): .git"
return 1
fi