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 base64 | |
valueRaw = 'R29vZGJ5ZSwgd29ybGQuICBTaW5jZXJlbHksIEtpbSBKb25nIFVuLiAgVGhhbmtzLCBCZW4gZm9yIHlvdXIgZW5jb3VyYWdlbWVudC4=' | |
value = base64.b64decode(valueRaw).decode('utf-8') | |
img_data = b'/9j/4AAQSkZJRgABAQEAAAAAAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAGQAZADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxE |
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.Web.Http; | |
namespace KatanaWebApiAndStaticConsole { | |
public class HelloWorldController : ApiController { | |
public string Get() => "Hello World"; | |
} | |
} | |
} |
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
httpClient.DefaultRequestHeaders.Authorization = | |
new AuthenticationHeaderValue( | |
"Basic", | |
Convert.ToBase64String( | |
System.Text.ASCIIEncoding.ASCII.GetBytes( | |
string.Format("{0}:{1}", username, password)))); |
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
# this file needs to be put on the ELK server at: /etc/logstash/conf.d/logstash.conf | |
# for more info, see https://www.digitalocean.com/community/tutorials/how-to-centralize-logs-with-rsyslog-logstash-and-elasticsearch-on-ubuntu-14-04 | |
# This input block will listen on port 514 for logs to come in. | |
# host should be an IP on the Logstash server. | |
# codec => "json" indicates that we expect the lines we're receiving to be in JSON format | |
# type => "rsyslog" is an optional identifier to help identify messaging streams in the pipeline. | |
input { | |
udp { |
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" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |
</configSections> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
</startup> | |
<log4net> | |
<appender name="UdpAppender" type="log4net.Appender.UdpAppender"> |
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
// based on http://robrelyea.wordpress.com/2007/02/10/winforms-xaml/ | |
// converted to an Extension Method by @CADbloke | |
// a list: http://msdn.microsoft.com/en-us/library/ms750559(v=vs.110).aspx | |
// here's moar code:http://wf2wpf.codeplex.com/SourceControl/latest but it converts source files, not actual controls. | |
// Here's a site that does code too http://www.win2wpf.com/ | |
// http://www.codeproject.com/Articles/25795/Creating-the-Same-Program-in-Windows-Forms-and-WPF | |
// ReSharper disable SpecifyACultureInStringConversionExplicitly | |
using System; |
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" encoding="utf-8" ?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" | |
targetNamespace="urn:packages" xmlns="urn:packages"> | |
<xs:element name="packages"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="package" maxOccurs="unbounded"> | |
<xs:complexType> | |
<xs:attribute name="id" type="xs:string" use="required" /> | |
<xs:attribute name="version" type="xs:string" use="required" /> |
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
javascript:(function(){var url = window.location.host.split('.'); window.location.href = "tsvncmd:command:checkout?path:D:\\_Source Code\\CodePlex\\" + url[0] + "?url:https://" + url[0] + ".svn." + url[1] + "." + url[2] + "/svn";})(); |
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
javascript:(function(){window.location.href = "github-windows://openRepo/https://git01.codeplex.com/" + window.location.host.split('.')[0];})(); |
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
$path = "<some path>" | |
cls | |
$files = gci -Recurse -Path $path -Include packages.config | |
foreach($file in $files) { | |
[xml]$doc = $file | Get-Content | |
$dups = $doc.packages.package | Group-Object -Property id | Where-Object Count -GT 1 | Select Name, Count |
NewerOlder