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
| private static Version TargetedVersion = new Version(8, 0); | |
| public static bool IsTargetedVersion { get { return Environment.OSVersion.Version >= TargetedVersion; } } | |
| if (IsTargetedVersion) | |
| { | |
| // use the new live tiles | |
| } | |
| else | |
| { | |
| // use the old live tiles |
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
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^([^\.]+)$ $1.php [NC,L] |
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
| -- extract credentials from query string | |
| local email = request.query.email | |
| local key = request.query.key | |
| -- parse post-receive hook payload | |
| local data = json.parse(request.form.payload) | |
| -- extract repository name and url | |
| local repository = data.repository.name | |
| local repositoryUrl = data.repository.url |
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
| local sku = '8390054' | |
| local zipcode = '10001' | |
| local response = http.request { | |
| url = 'http://api.remix.bestbuy.com/v1/stores(area(' .. zipcode .. ',15))+products(sku=' .. sku .. ')?format=json&apiKey=YOUR_API_KEY' | |
| } | |
| local data = json.parse(response.content) | |
| if #data.stores > 0 then |
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
| <Grid x:Name="LayoutRoot" Width="336" Height="336"> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="*" /> | |
| <ColumnDefinition Width="Auto" /> | |
| </Grid.ColumnDefinitions> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="*" /> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> |
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
| public void RenderLiveTileImage(string filename, string title, string content) | |
| { | |
| this.txtTitle.Text = title; | |
| this.txtContent.Text = content; | |
| this.Measure(new Size(336, 336)); | |
| this.Arrange(new Rect(0, 0, 336, 336)); | |
| this.UpdateLayout(); | |
| WriteableBitmap image = new WriteableBitmap(336, 336); |
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
| FlipTileData tile = new FlipTileData(); | |
| tile.Title = data.Name; | |
| tile.Count = tasksOverdue.Count + tasksDueToday.Count; | |
| FlipTileTemplate image = new FlipTileTemplate(); | |
| string imagePath = "/Shared/ShellContent/" + data.Id + ".png"; | |
| image.RenderLiveTileImage(imagePath, Strings.LiveTileDueToday + ":", FormatFlipTileTemplateContent(tasksDueToday)); | |
| tile.BackgroundImage = new Uri("isostore:" + imagePath, UriKind.Absolute); |
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
| local ACCESS_TOKEN = 'YOUR_PERSONAL_ACCESS_TOKEN' | |
| local USERNAME = 'YOUR_GITHUB_USERNAME' | |
| -- import Microlight lua library | |
| local ml = require('mbmccormick/Microlight/ml.lua') | |
| -- parse inbound request from Postmark service | |
| local data = json.parse(request.body) | |
| local subject = data.Subject |
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
| sudo apt-get install python-usb python-pip | |
| sudo pip install galileo |
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
| SUBSYSTEM=="usb", ATTR{idVendor}=="2687", ATTR{idProduct}=="fb01", SYMLINK+="fitbit", MODE="0666" |