Skip to content

Instantly share code, notes, and snippets.

View meklu's full-sized avatar

Melker Narikka meklu

View GitHub Profile
/* Lisenssi: CC-0 */
/* Fiksaa tuhaterotinhäröilyt.
* Tämän jälkeen voi normalisoida kivasti yhdellä passilla :)
*/
const erotus = (str) => {
const pilkku_i = str.indexOf(",")
const piste_i = str.indexOf(".")
if (pilkku_i < piste_i) { str = str.replace(/,/g, "") }
else { str = str.replace(/\./g, "") }
#include <stdio.h>
int main(void) {
int a = 0xdeadbeef;
/* Always big-endian */
printf("%c%c%c%c\n", (a & 0xff000000) >> 24, (a & 0xff0000) >> 16, (a & 0xff00) >> 8, (a & 0xff));
/* Native endian */
printf("%c%c%c%c\n", ((char*) &a)[0], ((char*) &a)[1], ((char*) &a)[2], ((char*) &a)[3]);
return 0;
}
@meklu
meklu / keybase.md
Created April 11, 2014 17:11
keybase.md

Keybase proof

I hereby claim:

  • I am meklu on github.
  • I am meklu (https://keybase.io/meklu) on keybase.
  • I have a public key whose fingerprint is 704C 05C0 7845 7ADB 6B87 03D8 9D6D 60DE 2B47 8A36

To claim this, I am signing this object:

package org.meklu.noobtils;
import org.meklu.noobtils.Read;
public class ascensionenhanced {
private static Read read = new Read();
/**
* @author Melker "meklu" Narikka
*/
// a method for sorting some amount of integers provided by the user