Skip to content

Instantly share code, notes, and snippets.

@MaciejLisCK
MaciejLisCK / JS-LINQ.js
Last active March 26, 2019 16:17 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
];
// Where
@MaciejLisCK
MaciejLisCK / sonic-pi-cheatsheet.md
Last active August 14, 2018 19:27
Sonic Pi Cheatsheet

Function - define

define :foo do
  
end

Function - define with parameter

define :foo do |n|
@MaciejLisCK
MaciejLisCK / receiver.c
Last active May 20, 2016 13:55
Microcontroller Serial in Keil, RS232, Serial Communication, C, avr, atmel
#include <REGX52.H>
void Serial() interrupt 4
{
if(RI == 1)
{
P1 = SBUF;
RI = 0;
}
}
@MaciejLisCK
MaciejLisCK / 1TestComponent.cs
Last active December 17, 2015 12:48
SSIS Custom Component Error Output
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
[DtsPipelineComponent(DisplayName = "Test Component", ComponentType = ComponentType.Transform,
@MaciejLisCK
MaciejLisCK / 1. usage.html
Last active October 19, 2018 14:27
AngularJs onsizechanged, onresize, on element resize directive, angularjs responsiveness
<div on-size-changed="logResize">
Foo
</div>
@MaciejLisCK
MaciejLisCK / d3PolishLocale
Last active February 4, 2018 19:52
Polish d3 localization. d3js, localize, polski
var d3PolishLocale = {
"decimal": ",",
"thousands": " ",
"grouping": [3],
"currency": ["", "zł"],
"dateTime": "%e %b %Y %X",
"date": "%Y-%m-%d",
"time": "%H:%M:%S",
"periods": ["", ""], // AM,PM
"days": ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"],
@MaciejLisCK
MaciejLisCK / CsvBuilder.cs
Last active June 29, 2020 05:56
C# CSV Builder using lambda (with escape)
class Program
{
static void Main(string[] args)
{
var csvBuilder = new CsvBuilder<User>();
var users = new User[]
{
new User() { FirstName = "Maciej", LastName = "Lis", BirthDate = new DateTime(1986,10,31) },
new User() { FirstName = "Krzysztof", LastName = "Lis", BirthDate = new DateTime(1960,1,1), Notes = "Like \".NET Framework\"."},
new User() { FirstName = "Barbara", LastName = "Lis", BirthDate = new DateTime(1960,2,12), Notes = "Buy:\n- 1 orange\n- milk" },