d3js: Create an HTML select box using d3.js and create a paragraph referencing the selection.
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/bash | |
| if [ "$1" == "" ]; then | |
| echo Usage: $0 pngfile | |
| exit 0; | |
| fi | |
| FILE=`basename $1 .png` | |
| if [ ! -e $FILE.png ]; 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
| function deleteFromImgur() { | |
| $.ajax({ | |
| url: "https://api.imgur.com/3/image/{id}", | |
| type: "DELETE", | |
| headers: { | |
| "Authorization": "Client-ID YOUR-CLIEND-ID-GOES-HERE" | |
| }, | |
| success: function(response) { | |
| //console.log(response); | |
| } |
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
| // ==UserScript== | |
| // @name Yammer Remove Join Notifications | |
| // @namespace https://www.yammer.com/ | |
| // @include https://www.yammer.com/stonybrook.edu/* | |
| // @include https://www.yammer.com/stonybrook.edu#/Threads/index?type=algo | |
| // @include https://www.yammer.com/stonybrook.edu#/* | |
| // @version 1 | |
| // ==/UserScript== |
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
| /* | |
| OAuthRedirectPage.aspx | |
| ========================== | |
| <div> | |
| <asp:Label ID="OAuthLabel" runat="server" Text="Label"></asp:Label> | |
| </div> | |
| OAuthRedirectPage.aspx.cs | |
| ========================== | |
| */ |
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 static void MakeComboBoxSearchable(this ComboBox targetComboBox) | |
| { | |
| targetComboBox.Loaded += (ls, le) => | |
| { | |
| targetComboBox.Items.IsLiveFiltering = true; | |
| var targetTextBox = targetComboBox.Template.FindName("PART_EditableTextBox", targetComboBox) as TextBox; | |
| if (targetTextBox == null) return; | |
| targetComboBox.IsEditable = 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
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
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
| using System; | |
| using System.Drawing; | |
| using System.Drawing.Imaging; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Windows.Forms; | |
| namespace ScreenGrab.Core.Helpers | |
| { |
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
| const id = '__JUNK__'; | |
| // Public key need to be in PKCS8 format | |
| // ssh-keygen -e -m PKCS8 -f id_rsa.pub > id_rsa.pkcs8 | |
| const publicKey = fs.readFileSync(path.join(__dirname, 'id_rsa.pkcs8'), { encoding : 'utf8' }); | |
| const privateKey = fs.readFileSync(path.join(__dirname, 'id_rsa'), { encoding : 'utf8' }); | |
| // Sign | |
| const signer = crypto.createSign('RSA-SHA512'); | |
| signer.update(id); | |
| const signature = signer.sign(privateKey, 'hex'); |
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
| using Org.BouncyCastle.Crypto; | |
| using Org.BouncyCastle.Crypto.Parameters; | |
| using Org.BouncyCastle.OpenSsl; | |
| using Org.BouncyCastle.Security; | |
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| namespace MyProject.Data.Encryption | |
| { |
OlderNewer