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
archetypeDir = "archetypes" | |
author = "Imran M Yousuf" | |
baseUrl = "https://imytech.net" | |
buildDrafts = true | |
relativeURLs = true | |
canonifyUrls = true | |
contentDir = "content" | |
languageCode = "en-us" | |
layoutDir = "layouts" | |
publishDir = "public" |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"sort" | |
"strings" | |
"unicode" | |
) |
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
$.phoneNumbers[?(@.type=='home')].number | |
$.firstName |
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 | |
set -e | |
set -x | |
make setup-docker-dev | |
(cd web/img-mngr/ && au build --watch > /dev/null &) | |
go install | |
(cd dist/ && fs-image-manager ) |
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 | |
latest_release=$(curl "https://api.github.com/repos/imyousuf/fs-image-manager/releases/latest" -H "Accept: application/json" -L) | |
( | |
mkdir -p dist/ | |
cd dist/ | |
version=$(echo "$latest_release" | grep "tag_name" | cut -d '"' -f 4) | |
fe="false" | |
test -f version.txt && fe="true" | |
test -f fs-image-manager.pid && kill -2 $(cat fs-image-manager.pid) && echo "Existing fs-image-manager shutdown" | |
download_new="true" |
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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<!-- | |
/** | |
* Copyright 2009 The Apache Software Foundation | |
* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file |
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 | |
HUDSON_WORK_DIR=/home/hudson/.hudson/ | |
BACKUP_DIR=/home/smartadmin/hudson/backup/ | |
files_to_copy=$(find "$HUDSON_WORK_DIR" | grep -v "^\(.*/\(workspace\|builds\|modules\)/.*\)") | |
( | |
stamp=$(date +%Y-%m-%d'T'%H:%M:%S%z) | |
current_bk_dir="$BACKUP_DIR" | |
mkdir -p "$current_bk_dir" | |
cd "$current_bk_dir" || exit 1 | |
test -d .git || git init |
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
ByteBuffer buffer = ByteBuffer.allocate(testData.length); | |
ByteBuffer tmp = buffer; | |
LinkedHashMap<ByteBuffer, MutableInt> map = new LinkedHashMap<ByteBuffer, MutableInt>(); | |
map.put(tmp, new MutableInt()); | |
tmp.put(testData); // Right after this operation hashCode changes but the buffer is equal | |
assertTrue(buffer.equals(tmp)); | |
assertNull(map.get(buffer)); |
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.io.IOException; | |
import org.apache.hadoop.hbase.HBaseConfiguration; | |
import org.apache.hadoop.hbase.HColumnDescriptor; | |
import org.apache.hadoop.hbase.HTableDescriptor; | |
import org.apache.hadoop.hbase.client.Get; | |
import org.apache.hadoop.hbase.client.HBaseAdmin; | |
import org.apache.hadoop.hbase.client.HConnection; | |
import org.apache.hadoop.hbase.client.HConnectionManager; | |
import org.apache.hadoop.hbase.client.HTable; | |
import org.apache.hadoop.hbase.client.Put; |
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
[ivy:resolve] :: resolution report :: resolve 1241ms :: artifacts dl 36ms | |
--------------------------------------------------------------------- | |
| | modules || artifacts | | |
| conf | number| search|dwnlded|evicted|| number|dwnlded| | |
--------------------------------------------------------------------- | |
| ant | 3 | 0 | 0 | 0 || 3 | 0 | | |
| eclipse | 1 | 0 | 0 | 0 || 1 | 0 | | |
| compile | 17 | 0 | 0 | 0 || 17 | 0 | | |
| test | 21 | 0 | 0 | 0 || 21 | 0 | | |
| instrument | 7 | 0 | 0 | 0 || 7 | 0 | |