This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <curl/curl.h> | |
// Callback function to write response data from API | |
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* response) | |
{ | |
size_t totalSize = size * nmemb; | |
response->append((char*)contents, totalSize); | |
return totalSize; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"(C)1984-1985 Jecel Assumpcao Jr" | |
"$Id: st84.txt,v 1.1.1.1 1995/06/29 00:14:36 root Exp $" | |
"This is an implementation of Smalltalk described | |
in Smalltalk itself. This was designed in late 1984, but | |
what follows is a translation into English of the | |
February 26, 1985 version. It is only a paper design | |
as there was no way to test it then and represents | |
the first real object oriented design for the author. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filename: HttpServer.cs | |
// Author: Benjamin N. Summerton <define-private-public> | |
// License: Unlicense (http://unlicense.org/) | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
// MurmurHash3 was written by Austin Appleby, and is placed in the public | |
// domain. The author hereby disclaims copyright to this source code. | |
#ifndef _MURMURHASH3_H_ | |
#define _MURMURHASH3_H_ | |
//----------------------------------------------------------------------------- | |
// Platform-specific functions and macros |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conway's Game of Life in HolyC for TempleOS | |
// Ported from Rosetta Code. Original C Source: | |
// - http://rosettacode.org/wiki/Conway's_Game_of_Life#C | |
#define WIDTH 60 | |
#define HEIGHT 40 | |
#define SLEEP 100 | |
U32 Universe[HEIGHT][WIDTH]; | |
U64 COUNT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling | |
// URL: http://wiki.unity3d.com/index.php/Floating_Origin | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class FloatingOrigin : MonoBehaviour | |
{ | |
[Tooltip("Point of reference from which to check the distance to origin.")] | |
public Transform ReferenceObject = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Perlin noise implementation.""" | |
# Licensed under ISC | |
from itertools import product | |
import math | |
import random | |
def smoothstep(t): | |
"""Smooth curve with a zero derivative at 0 and 1, making it useful for | |
interpolating. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to @danger89 and @Ilothar for updating the gist. | |
# Set the name and the supported language of the project | |
project(hello-world C CXX) | |
# Set the minimum version of cmake required to build this project | |
cmake_minimum_required(VERSION 3.10) | |
# Use the package PkgConfig to detect GTK+ headers/library files | |
find_package(PkgConfig REQUIRED) | |
pkg_check_modules(GTK REQUIRED gtkmm-3.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
tokens=[ | |
space='regexp:\s+' | |
identifier='regexp:[a-zA-Z][a-zA-Z0-9_]*' | |
integer-constant='regexp:\d+' | |
character-constant='regexp:[a-zA-Z]' | |
floating-constant='regexp:[+-]?([0-9]*[.])?[0-9]+f' | |
enumeration-constant='regexp:[a-zA-Z][a-zA-Z0-9_]*' // Same as identifier | |
] |