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
DELIMITER $ | |
DROP PROCEDURE IF EXISTS sys.rename_database; | |
CREATE PROCEDURE sys.rename_database(IN old_schema VARCHAR(255), IN new_schema VARCHAR(255)) | |
BEGIN DECLARE done INT DEFAULT FALSE; | |
DECLARE t VARCHAR(255); | |
DECLARE v VARCHAR(255); | |
DECLARE d TEXT; |
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 java.net.*; | |
import java.net.http.*; | |
import javax.net.ssl.*; | |
import java.security.cert.*; | |
var trustAllCerts = new TrustManager[]{ | |
new X509TrustManager() { | |
public X509Certificate[] getAcceptedIssuers() { return null; } | |
public void checkClientTrusted(X509Certificate[] certs, String authType) { } | |
public void checkServerTrusted(X509Certificate[] certs, String authType) { } | |
} |
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
SELECT | |
CONCAT( | |
'ALTER TABLE ', | |
TABLE_NAME, | |
' ADD ', | |
CASE | |
WHEN MAX(NON_UNIQUE) = 1 THEN 'INDEX ' | |
ELSE 'UNIQUE INDEX ' | |
END, | |
INDEX_NAME, |
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
PATH="/usr/pkg/sbin:/usr/pkg/bin:$PATH" | |
PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages" | |
PKG_PATH="$PKG_PATH/$(uname -s)/$(uname -m)/$(uname -r|cut -f '1 2' -d.|sed 's/.99.*$/.0/')/All" | |
export PATH PKG_PATH | |
pkg_add pkgin |
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
# Duplicate UID Errors | |
export OLD=old-hostname NEW=new-hostname | |
find ~/Maildir -name "*.${OLD}*" -type f -exec bash -c 'X={}; Y=${X/$OLD/$NEW}; [ "$X" != "$Y" ] && mv --verbose "$X" "$Y"' \; |
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
diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h | |
index 794a375dad36..7009fc176636 100644 | |
--- a/tools/lib/subcmd/subcmd-util.h | |
+++ b/tools/lib/subcmd/subcmd-util.h | |
@@ -49,13 +49,12 @@ static NORETURN inline void die(const char *err, ...) | |
static inline void *xrealloc(void *ptr, size_t size) | |
{ | |
- void *ret = realloc(ptr, size); | |
- if (!ret && !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
#!/bin/sh | |
XDISPLAY_NUM=3 | |
XDISPLAY=":${XDISPLAY_NUM}" | |
export XDISPLAY | |
Xephyr -fp ~/.fonts/ -ac -br ":${XDISPLAY_NUM}" -resizeable & | |
XEPHYR_PID=$! | |
sleep 1 | |
DISPLAY=$XDISPLAY xrdb "$HOME/.Xresources" | |
DISPLAY=$XDISPLAY STUMPWM_INNER="$XDISPLAY_NUM" "$HOME/.stumpwm.d/init.ros" | |
wait "$XEPHYR_PID" |
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
user_pref("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0"); | |
user_pref("general.buildID.override", "20181001000000"); | |
user_pref("general.appversion.override", "5.0 (Windows)"); | |
user_pref("general.oscpu.override", "Windows NT 10.0; Win64; x64"); | |
user_pref("general.platform.override", "Win32"); |
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 perl | |
use strict; | |
use File::Find (); | |
use feature qw(say); | |
use Carp qw(croak); | |
use Data::Dumper; | |
use vars qw/*name *dir *prune/; | |
*name = *File::Find::name; | |
*dir = *File::Find::dir; | |
*prune = *File::Find::prune; |
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 --split-string=perl -p | |
s/ \x1B [ @ A-Z \\ \] ^_ ] //gx; | |
s/ \x1B \[ [0-9 : ; < = > ? ]{1,8} \W? [@ A-Za-z ^_\` {|} ~]? //gx; |
NewerOlder