I hereby claim:
- I am frank-borkin on github.
- I am frankborkin (https://keybase.io/frankborkin) on keybase.
- I have a public key whose fingerprint is DF55 28E3 3792 D599 9E73 9D9B 819A DADA 5BEB 8E22
To claim this, I am signing this object:
## Typically when bootrec /fixboot throws an error | |
diskpart | |
select disk 0 | |
list vol | |
select vol 1 | |
assign letter=v: | |
v: | |
md \efi\microsoft\boot | |
bcdboot c:\windows /l en-us /s V: /f all | |
bootsect /nt60 sys |
# send logs for all traffic to google analytics | |
# | |
# in server block: | |
# set $google_analytics_id "UA-THECORRECT-ID"; | |
# include /etc/nginx/google_analytics; | |
# | |
# in location blocks: | |
# post_action @ga; | |
userid on; |
using System.Threading.Tasks; | |
using System.Collections.Generic; | |
using System.Net; | |
using StackExchange.Redis; | |
namespace MyNamespace | |
{ | |
/// <summary>Extensions for StackDrivers Redis package</summary> | |
public static class RedisWildcardExtension | |
{ |
//// In this example, if the user's first name is set, but their nickname isn't, we set the nickname to the first name. | |
db.users.find({$and:[{"firstName":{$ne:null}},{"nickname":null}]}).snapshot().forEach( | |
function (elem) { | |
db.users.update( | |
{ | |
_id: elem._id | |
}, | |
{ | |
$set: { | |
nickname: elem.firstName |
//// Grab everything with 32 characters, split the id and add hyphens then create a new record with that as the id | |
db.users.aggregate({$match:{"_id":{$regex:/^.{32}$/}}},{$project:{item: 1,g1: { $substr: [ "$_id", 0, 8 ] },g2: { $substr: [ "$_id", 8, 4 ] },g3: { $substr: [ "$_id", 12, 4 ] },g4: { $substr: [ "$_id", 16, 4 ] },g5: { $substr: [ "$_id", 20, 12 ] }}}).forEach( | |
function(e) { | |
var new_guid = e.g1+'-'+e.g2+'-'+e.g3+'-'+e.g4+'-'+e.g5; | |
doc = db.users.findOne({"_id": e._id}) | |
doc._id = new_guid | |
db.users.insert(doc) | |
}); | |
//// You may be asking why? Well, .net uses hypen form, and lots of other things don't, so if you've done a bulk import from several different systems you can use this to normalise them. |
create table caught_errors ( | |
dt date, | |
username varchar2( 30), -- value from ora_login_user | |
msg varchar2(2000), | |
stmt varchar2(2000) | |
); | |
create or replace trigger catch_errors | |
after servererror on database |
cd /etc/pki/ca-trust/source/anchors/ | |
sudo wget https://something/ca.pem | |
sudo update-ca-trust extract |
I hereby claim:
To claim this, I am signing this object: