Skip to content

Instantly share code, notes, and snippets.

View gumienny's full-sized avatar

Mariusz Gumienny gumienny

  • Rzeszow, Poland
View GitHub Profile

FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.


Effective Engineer - Notes

What's an Effective Engineer?

@gumienny
gumienny / gist:63b1840bce3ce448386927dee3615071
Created August 16, 2018 07:01 — forked from devtoor/gist:5eace73c3570b247341c99de60754c3a
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@gumienny
gumienny / rgbToLab.js
Created August 24, 2018 11:39 — forked from Dammmien/rgbToLab.js
RGB to LAB
function rgbToLab( R, G, B ) {
R = ( R / 255 );
G = ( G / 255 );
B = ( B / 255 );
if ( R > 0.04045 ) R = Math.pow( ( R + 0.055 ) / 1.055, 2.4 );
else R = R / 12.92;
if ( G > 0.04045 ) G = Math.pow( ( G + 0.055 ) / 1.055, 2.4 );
else G = G / 12.92;
if ( B > 0.04045 ) B = Math.pow( ( B + 0.055 ) / 1.055, 2.4 );
@gumienny
gumienny / rust.md
Last active September 29, 2018 07:52
fn main() {
    let s1 = String::from("hello");
    let (s2, len) = calculate_length(s1);
    println!("The length of '{}' is {}.", s2, len);
}

fn calculate_length(s: String) -> (String, usize) {
    let length = s.len(); // len() returns the length of a String
  • parzystość liczby x & 1
  • sprawdzenie czy dwa int-y mają przeciwny znak (x ^ y) < 0
  • dodanie 1 do int-a -~x
  • swap
x = x ^ y; // x^= y;
y = x ^ y;
x = x ^ y;
  • wyłączenie k-tego bitu x &amp; (~(1 &lt;&lt; (k - 1)))