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
| FROM ruby:2.2.0 | |
| RUN apt-get update -qq && \ | |
| apt-get install -y \ | |
| build-essential \ | |
| libpq-dev \ | |
| postgresql-client \ | |
| libxml2-dev \ | |
| libxslt1-dev \ | |
| nodejs && \ |
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
| #!/bin/bash | |
| set -e | |
| echo "==> Cleaning..." | |
| docker rm $(docker ps -a -q | |
| echo "==> Complete" |
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
| # Maintainer: Arthur Zamarin <[email protected]> | |
| # Updated By: Matthew Johnston <[email protected]> | |
| # | |
| pkgname=clib | |
| pkgver=1.4.2 | |
| pkgrel=1 | |
| pkgdesc="C package manager-ish" | |
| arch=(i686 x86_64) | |
| url="https://github.com/clibs/clib" |
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
| require 'mail' | |
| class EmailValidator < ActiveModel::EachValidator | |
| def valid_email?(value) | |
| a = Mail::Address.new(value) | |
| if a.domain && a.address == value | |
| elements = a.domain.split(/\./) | |
| a.domain.match(/\A\S+\Z/) && elements.none?(&:blank?) && elements.size > 1 | |
| else |
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
| /// Seed of Andromeda Icosphere Generator | |
| /// Written by Frank McCoy | |
| /// Use it for whatever, but remember where you got it from. | |
| /// | |
| /// SEE: https://www.seedofandromeda.com/blogs/49-procedural-gas-giant-rendering-with-gpu-noise | |
| /// SEE: http://pastebin.com/aFdWi5eQ | |
| #include <cstdint> | |
| #include <unordered_map> | |
| #include <vector> |
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 "minitest.h" | |
| int main(int argc, const char *argv[]) { | |
| ASSERT_TRUE(0, "expected 0 to be true"); | |
| ASSERT_FALSE(0, "expected 0 to be false"); | |
| return 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
| #ifndef UTILS_LOGGING_H | |
| #define UTILS_LOGGING_H | |
| #include <stdio.h> | |
| /** | |
| * Default logging level will be INFO | |
| */ | |
| #ifndef LOGLEVEL | |
| #define LOGLEVEL 4 |
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
| . | |
| ├── assets | |
| ├── build | |
| │ ├── book.epub | |
| │ ├── book.epub3 | |
| │ └── book.html | |
| ├── Rakefile | |
| ├── scratch | |
| ├── src | |
| │ ├── backmatter |
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
| /* | |
| * Generic hashmap manipulation functions | |
| * SEE: http://elliottback.com/wp/hashmap-implementation-in-c/ | |
| */ | |
| #ifndef __HASHMAP_H__ | |
| #define __HASHMAP_H__ | |
| #define MAP_MISSING -3 /* No such element */ | |
| #define MAP_FULL -2 /* Hashmap is full */ |
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 <stdint.h> | |
| #include <string.h> | |
| uint32_t float_to_raw_bits(float x) | |
| { | |
| uint32_t y; | |
| memcpy(&y, &x, 4); | |
| return y; | |
| } |