Skip to content

Instantly share code, notes, and snippets.

View njlr's full-sized avatar
🌏
F# ing

njlr njlr

🌏
F# ing
View GitHub Profile
@njlr
njlr / dell-studio-xps-8100-hackintosh.md
Last active March 23, 2021 11:44
Dell Studio XPS 8100 Hackintosh

Dell Studio XPS 8100 Hackintosh Build

Components

  • Dell Motherboard
  • Dell RAM 3x2GB DDR3 SDRAM
  • Intel Core i7 2.93 GHz
  • ASUS NVIDIA 970 GTX
  • Samsung Evo 850 SSD
Hello again.
// Jyt is a REPL for C++
// You can write code interactively
// Highlight some code and press alt-enter to execute it
// For example:
auto x = "hello world";
// Now you can query the value in the terminal on the right
// e.g. "x"
@njlr
njlr / cpp-sleep-example
Created August 8, 2016 11:26
A quick example of how to sleep the current thread in C++
#include <iostream>
#include <thread>
#include <chrono>
using namespace std::literals::chrono_literals;
for (int i = 0; i < 5; i++) {
std::cout << "Zzz... " << std::endl;
std::this_thread::sleep_for(1s);
}
@njlr
njlr / raleigh-frame-serial-numbering-system.md
Created August 9, 2016 14:34
The numbering system used for Raleigh bicycle frames

For Your Information: Frame Serial Numbering System

The location of our frame serial numbers will be on the top of the seat tube facing to the rear of the bicycle. This does not apply to models with 531 seat tubes which will be numbered under the bottom bracket. Markings show the source of manufacture, approximate date of manufacture and unique number of each frame manufactured in any 10 year cycle.

Size of letters and numbers 3/16" high, to match diameter of tubes. The complete stamp contains nine digits.

FIRST SYMBOL Denotes Location of Manufacture

Symbol | Location

#include <iostream>
#include <string>
int main() {
auto f = []() {
return 17;
};
std::cout << f() << std::endl;
std::cout << &f << std::endl;
std::cout << sizeof(f) << std::endl;
@njlr
njlr / test.cpp
Created August 18, 2016 20:16
Gist created by fiddle.jyt.io
// Jyt is a REPL for C++
// You can write code interactively
// Highlight some code and press alt-enter to execute it
// For example:
auto x = "hello world";
// Now you can query the value in the terminal on the right
// e.g. "x"
@njlr
njlr / does-not-compile.cpp
Created August 22, 2016 09:29
Some code that fails to compile on http://fiddle.jyt.io
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define TINYFD_NOLIB
#ifdef _WIN32
#pragma warning(disable:4996) /* allows usage of strncpy, strcpy, strcat, sprintf, fopen */
#pragma warning(disable:4100) /* allows usage of strncpy, strcpy, strcat, sprintf, fopen */
@njlr
njlr / fast-polymorphic-collections.cpp
Created August 25, 2016 11:39
Gist created by fiddle.jyt.io
/* Performance measurements of a fast collection type for polymorphic objects.
*
* Copyright 2014-2015 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#include <algorithm>
#include <array>
@njlr
njlr / brainfuck.cpp
Created August 29, 2016 17:12
Gist created by fiddle.jyt.io
#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include <unistd.h>
using namespace std;
class Brainfuck {
public:
char data[30000];