Skip to content

Instantly share code, notes, and snippets.

Bojan Bjelić bojanbjelic

Block or report user

Report or block bojanbjelic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bojanbjelic
bojanbjelic / gist:b3058ea8c1344c57bcd54705c58894fb
Last active May 12, 2019 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos
View gist:b3058ea8c1344c57bcd54705c58894fb

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the Domain-Driven Design Quickly Minibook https://www.infoq.com/minibooks/domain-driven-design-quickly. During the day watch following great videos (in this order):

  1. Eric Evans' What I've learned about DDD since the book https://www.infoq.com/presentations/ddd-eric-evans  https://youtu.be/lE6Hxz4yomA
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
@bojanbjelic
bojanbjelic / curl-soap.cmd
Last active May 12, 2019
curl a SOAP service
View curl-soap.cmd
curl "https://www.example.com/Service.svc" -H "SOAPAction: ""urn:service.example.com/IService/GetObject""" --data-binary @post.txt --comcodessed -k -D responseHeaders.txt -v -o response.txt
@bojanbjelic
bojanbjelic / selectElementsFromAjaxResponse.js
Last active Jun 18, 2018
Selecting Elements Returned From Jquery Ajax Response Strings
View selectElementsFromAjaxResponse.js
$(function () {
$.get('contentUrl', function (response) {
var source = $('<div>' + response + '</div>');
$('#target').empty().append(
$('<div/>')
.append(response)
.find('#selectorInResult');
);
});
});
@bojanbjelic
bojanbjelic / rss-dl-mp3.sh
Created Nov 19, 2012
download mp3s from a rss feed
View rss-dl-mp3.sh
wget [RSS URL]
grep -e '[^"]*\.mp3' [downloaded RSS] | grep -o '[^"]*\.mp3' '-' >> list.txt
wget -i list.txt
View pip on windows.cmd
%AppData%\..\Local\Programs\Python\Python35-32\Scripts\pip.exe install jsonschema
py -m pip install svglib
View symboliclink.sh
@bojanbjelic
bojanbjelic / spider-urls.sh
Created Feb 14, 2013
spider unique URLs on pages, starting from one URL
View spider-urls.sh
wget --spider --force-html -r -l1 http://tigar.ir.ttweb.net/ 2>&1 | grep '^--' | awk '{ print $3 }' | grep -v '\.\(css\|txt\|png\|gif\|jpg\|js\)$' | sort --unique
@bojanbjelic
bojanbjelic / img2ascii.js
Created Apr 9, 2015
convert image to ascii
View img2ascii.js
// taken from http://thecodeplayer.com/walkthrough/cool-ascii-animation-using-an-image-sprite-canvas-and-javascript
//some variables
var r, g, b, gray;
var character, line = "";
//sprite stuff
var sprite = document.getElementById("sprite");
var W = sprite.width;
var H = sprite.height;
View cassinikill.cmd
taskkill /IM WebDev.WebServer40.exe /F
@bojanbjelic
bojanbjelic / ToStringViaReflection.cs
Last active Dec 29, 2015
generic ToString method to show properties and values using Reflection
View ToStringViaReflection.cs
public override string ToString()
{
var propertiesInfo =
GetType().GetProperties().Where(p => Attribute.IsDefined(p, typeof (DataMemberAttribute)));
StringBuilder str = new StringBuilder();
foreach (var propertyInfo in propertiesInfo)
{
if (str.Length > 0)
str.Append(", ");
You can’t perform that action at this time.