Skip to content

Instantly share code, notes, and snippets.

View ProgramistycznySwir's full-sized avatar
🦸
BLOODY DIABOLICAL!!

Daniel Pietrzeniuk ProgramistycznySwir

🦸
BLOODY DIABOLICAL!!
  • Białystok, Poland
View GitHub Profile
/*
1) Open https://popcat.click
2) Open console (F12)
3) Insert code & run
*/
var event = new KeyboardEvent('keydown', {
key: 'g',
ctrlKey: true
@ProgramistycznySwir
ProgramistycznySwir / FizzBuzz.cs
Created March 23, 2021 21:15
FizzBuzz oneliner in C#
int n = 100;
Console.WriteLine(string.Join('\n',Enumerable.Range(0, n).Select(i => ((i % 3 == 0 ? "Fizz" : "") + (i % 5 == 0 ? "Buzz" : "")) is string ii ? (ii != "" ? ii : i.ToString()) : "")));
According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?
@zmilonas
zmilonas / GDPR_CV.md
Last active January 14, 2024 19:04
Formułka do CV, resume, RODO GDPR Compliant resume formulae

Polski 🇵🇱

Wyrażam zgodę na przetwarzanie moich danych osobowych w celu rekrutacji zgodnie z art. 6 ust. 1 lit. a Rozporządzenia Parlamentu Europejskiego i Rady (UE) 2016/679 z dnia 27 kwietnia 2016 r. w sprawie ochrony osób fizycznych w związku z przetwarzaniem danych osobowych i w sprawie swobodnego przepływu takich danych oraz uchylenia dyrektywy 95/46/WE (ogólne rozporządzenie o ochronie danych)

English 🇪🇺

I hereby give consent for my personal data included in my application to be processed for the purposes of the recruitment process under the European Parliament's and Council of the European Union Regulation on the Protection of Natural Persons as of 27 April 2016, with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (Data Protection Directive)

@tansey
tansey / gist:1444070
Created December 7, 2011 18:49
Sampling from a Gaussian Distribution in C#
public static double SampleGaussian(Random random, double mean, double stddev)
{
// The method requires sampling from a uniform random of (0,1]
// but Random.NextDouble() returns a sample of [0,1).
double x1 = 1 - random.NextDouble();
double x2 = 1 - random.NextDouble();
double y1 = Math.Sqrt(-2.0 * Math.Log(x1)) * Math.Cos(2.0 * Math.PI * x2);
return y1 * stddev + mean;
}