I hereby claim:
- I am haukurk on github.
- I am hauxi (https://keybase.io/hauxi) on keybase.
- I have a public key ASAuAPmKWphFhCqMR0py36c-otQlfo-JrnHHSL9xX0Hcvwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# return my IP addresses | |
function myip() { | |
ExtIP=`dig TXT +short o-o.myaddr.l.google.com @ns1.google.com` | |
echo $ExtIP | tr -d '"' | awk '{print "external : " $1}' | |
ifconfig lo0 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "lo0 : " $2}' | |
ifconfig en0 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "en0 (IPv4): " $2 " " $3 " " $4 " " $5 " " $6}' | |
ifconfig en0 | grep 'inet6 ' | sed -e 's/ / /' | awk '{print "en0 (IPv6): " $2 " " $3 " " $4 " " $5 " " $6}' | |
ifconfig en1 | grep 'inet ' | sed -e 's/:/ /' | awk '{print "en1 (IPv4): " $2 " " $3 " " $4 " " $5 " " $6}' | |
ifconfig en1 | grep 'inet6 ' | sed -e 's/ / /' | awk '{print "en1 (IPv6): " $2 " " $3 " " $4 " " $5 " " $6}' | |
} |
using Our.Umbraco.Vorto.Extensions; | |
using System; | |
using Umbraco.Core.Models; | |
namespace Umbraco.Custom.Extensions | |
{ | |
public static class PublishContentExtensions | |
{ | |
public static T GetNonNullableVortoValue<T>(this IPublishedContent content, string propertyAlias, T defaultValue, string cultureName = null) | |
{ |
--deletes in Document | |
--at this point all associated media files are deleted | |
delete from umbracoDomains where id in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
--deletes in Content | |
delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsPreviewXml where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsContentVersion where ContentId in (select id from umbracoNode where path like '%-20%' and id!=-20); | |
delete from cmsContentXml where NodeId in (select id from umbracoNode where path like '%-20%' and id!=-20); |
cat > main.m <<EOF
#import <objc/runtime.h>
#import <Foundation/Foundation.h>
int main () {
NSBundle *bundle = [NSBundle bundleWithPath:@"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu"];
Class principalClass = [bundle principalClass];
from abc import ABC, ABCMeta, abstractmethod | |
from collections import namedtuple | |
from itertools import count | |
PayloadFactory = namedtuple('PayloadFactory', [ | |
'good', 'created', 'queued', 'unchanged', 'requires_auth', | |
'permission_denied', 'not_found', 'invalid', 'error' | |
]) | |
""" |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxRkEH755QbPFZ602h/9tLz7O2Eu86aL2yXqEAbNuFe2w7op4bs3C/nYwLRzs3Ff2a073pIaB8GWy9YxWf6c1Sr8NIqiXyafvWyi1nLVJVb653dgM1nBsoQ2FYtVTCLe46OKf5S7gSHryfjT2B+zcUgNmWbgMAYCFTrNI1Q6+ajfB5dzXRP8hfmEljhCDAoFwo1sdVM4K3RhPCdVCD0XvXpXFLQ5pTykVslnk4nQX6EyZ2J4W4g3JztcYZLPxS5q2rYpu/3vR5et3T8OI2O0NeOdM2/Yuhxt28CT3Jdi7NCkr2mEGkCN4nOgpQpobQAos7+tQHQGWADquOoHVbvZst |
#!/bin/sh | |
INPSID=x850 | |
usage() | |
{ | |
echo "delete some archivelogs ahy!" | |
echo "" | |
echo "./del_archivelogs.sh" | |
echo "\t-h --help" |
FROM microsoft/dotnet:1.1.1-sdk | |
COPY ./NancyAPI.csproj /app/ | |
WORKDIR /app/ | |
RUN dotnet restore | |
ADD ./ /app/ | |
RUN dotnet publish -c Debug | |
EXPOSE 5000 |
#!/usr/bin/env bash | |
set -e | |
echo '>>> Get old container id' | |
CID=$(sudo docker ps | grep "project" | awk '{print $1}') | |
echo $CID | |
echo '>>> Building new image' | |
# Due to a bug in Docker we need to analyse the log to find out if build passed (see https://github.com/dotcloud/docker/issues/1875) | |
sudo docker build ./deploy | tee /tmp/docker_build_result.log |