This file contains 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
$propertyname = @{ | |
0x013B= "PropertyTagArtist"; | |
0x0102= "PropertyTagBitsPerSample"; | |
0x0109= "PropertyTagCellHeight"; | |
0x0108= "PropertyTagCellWidth"; | |
0x5091= "PropertyTagChrominanceTable"; | |
0x0140= "PropertyTagColorMap"; | |
0x501A= "PropertyTagColorTransferFunction"; | |
0x0103= "PropertyTagCompression"; | |
0x8298= "PropertyTagCopyright"; |
This file contains 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
// via http://blog.stephencleary.com/2012/08/asynchronous-lazy-initialization.html | |
/// <summary> | |
/// Provides support for asynchronous lazy initialization. This type is fully threadsafe. | |
/// </summary> | |
/// <typeparam name="T">The type of object that is being asynchronously initialized.</typeparam> | |
public sealed class AsyncLazy<T> | |
{ | |
/// <summary> | |
/// The underlying lazy task. | |
/// </summary> |
This file contains 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
// https://blogs.msdn.microsoft.com/pfxteam/2011/01/15/asynclazyt/ | |
public class AsyncLazy<T> : Lazy<Task<T>> | |
{ | |
public AsyncLazy(Func<T> valueFactory) : | |
base(() => Task.Factory.StartNew(valueFactory)) { } | |
public AsyncLazy(Func<Task<T>> taskFactory) : | |
base(() => Task.Factory.StartNew(() => taskFactory()).Unwrap()) { } | |
public TaskAwaiter<T> GetAwaiter() { return Value.GetAwaiter(); } |
This file contains 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 numpy as np | |
#Un'goro Numbers | |
numcom=49 | |
numrare=36 | |
numepic=27 | |
numlegend=23 | |
This file contains 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
0 0,8,12,16 * * * /home/pi/heathergraph_update.sh > /home/pi/heathergraph_update.log 2>&1 |
This file contains 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
wget http://node-arm.herokuapp.com/node_latest_armhf.deb | |
sudo dpkg -i node_latest_armhf.deb | |
sudo apt-get install libx11-dev | |
git clone https://github.com/microsoft/vscode | |
cd vscode | |
git checkout 1.0.0 | |
./scripts/npm.sh install --arch=armhf |
This file contains 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
sudo apt-get purge nodejs -y | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280 | |
sudo apt-add-repository "deb https://deb.nodesource.com/node_4.x precise main" | |
sudo apt-get update | |
sudo apt-get install nodejs |
This file contains 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
sudo apt-get update | |
sudo apt-get install ruby-full | |
sudo gem install jekyll | |
sudo gem install jekyll-sitemap | |
sudo gem install jekyll-redirect-from |
This file contains 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
[DllImport("user32.dll", SetLastError = true)] | |
[return: MarshalAs(UnmanagedType.Bool)] | |
static extern bool AddClipboardFormatListener(IntPtr hwnd); | |
[DllImport("user32.dll", SetLastError = true)] | |
[return: MarshalAs(UnmanagedType.Bool)] | |
static extern bool RemoveClipboardFormatListener(IntPtr hwnd); | |
private const int WM_CLIPBOARDUPDATE = 0x031D; |
This file contains 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
using Newtonsoft.Json.Linq; | |
using System; | |
using System.IO; | |
public static class Dropbox | |
{ | |
private static string _Path; | |
public static string Path | |
{ | |
get { return _Path ?? (_Path = GetPath()); } |