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
int main() { return 0; } | |
template <class T> | |
struct Interface | |
{ | |
public: | |
// static T testing() {}; | |
private: | |
static T (*__testing_checker)(); | |
}; |
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 -eo pipefail | |
cert_file="$1" | |
if [ -z "$cert_file" ]; then | |
echo "Usage: create-startssl-cert-bundle CERTIFICATE_FILE" >&2 | |
echo >&2 | |
echo "Bundles StartSSL's intermediate certs and writes combined certificate to stdout" >&2 | |
exit 1 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Integer | Array | | |
Directive | Element | Meaning | |
--------------------------------------------------------------------------- | |
C | Integer | 8-bit unsigned (unsigned char) | |
S | Integer | 16-bit unsigned, native endian (uint16_t) | |
L | Integer | 32-bit unsigned, native endian (uint32_t) | |
Q | Integer | 64-bit unsigned, native endian (uint64_t) | |
| | | |
c | Integer | 8-bit signed (signed char) | |
s | Integer | 16-bit signed, native endian (int16_t) |
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
If the count is an asterisk (“*”), all remaining array elements will be converted. | |
C | Integer | Array | | |
Type | Directive | Element | Meaning | |
--------------------------------------------------------------------------------------- | |
char | c | Integer | 8-bit signed | |
short | s | Integer | 16-bit signed, native endian | |
int | l | Integer | 32-bit signed, native endian | |
long long | q | Integer | 64-bit signed, native endian | |
| | | |
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
/* Compile with: clang++ -Ofast */ | |
/* Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) */ | |
/* 5.70s, 1.0Mb */ | |
#include <iostream> | |
#include <cstdio> | |
using namespace std; | |
void hannoi (int n, char from, char buffer, char to) | |
{ | |
if (n == 1) |
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
class Foo | |
@value = 0 | |
def initialize(v = 0, v2 = 10) | |
@value = v | |
@value2 = 10 | |
end | |
def value | |
@value | |
end |
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
ifdef linux | |
require "./linux_c_wrapper" | |
elsif windows | |
require "./windows_c_wrapper" | |
end | |
module CWrapper | |
ifdef linux | |
IMPL = OS::Linux::CWrapper | |
elsif windows |
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
ifdef windows | |
# already required "./winapi/kernel32.cr" in prelude | |
else | |
require "./dl/lib_dl.cr" | |
end | |
# This is a frontend wrapper, | |
# using LibDL or WinApi as backend. | |
module DL | |
ifdef windows |
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
import React from 'react' | |
import { Row, Col } from 'react-flexbox-grid' | |
import AppBar from 'material-ui/lib/app-bar' | |
import IconButton from 'material-ui/lib/icon-button' | |
import NavigationArrowBack from 'material-ui/lib/svg-icons/navigation/arrow-back' | |
import LoginForm from './components/LoginForm' | |
export default React.createClass({ | |
contextTypes: { | |
router: React.PropTypes.object.isRequired, |