This file contains 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
// Credits: http://goo.gl/NtaADC | |
// Inline PTX assembly | |
uint add_asm(uint *result, const uint *a, const uint *b) { | |
uint carry; | |
asm("{\n\t" | |
"add.cc.u32 %0, %9, %17; \n\t" | |
"addc.cc.u32 %1, %10, %18; \n\t" | |
"addc.cc.u32 %2, %11, %19; \n\t" | |
"addc.cc.u32 %3, %12, %20; \n\t" |
This file contains 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
using System; | |
using System.Linq; | |
using System.Web.Script.Serialization; | |
using System.Windows.Forms; | |
namespace AsynchronousWebPage | |
{ | |
/// <summary> | |
/// Extension convenience methods to invoke arbitrary Javascript method on a web page | |
/// hosted by a WebBrowser control. |
This file contains 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 -euo pipefail | |
if [ -z ${TFC_AWS_APPLY_ROLE_ARN+x} ] && [ -z ${TFC_AWS_RUN_ROLE_ARN+x} ]; then | |
echo "Skipping this script because both env vars are missing and unset"; | |
else | |
set +u | |
ROLE_ARN="${TFC_AWS_APPLY_ROLE_ARN:-$TFC_AWS_RUN_ROLE_ARN}" | |
set -u | |
echo "Preparing AWS provider auth..." |
This file contains 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
// https://www.spoj.pl/problems/PRIME1/ | |
//http://www.swageroo.com/wordpress/spoj-problem-2-prime-generator-prime1/ | |
#include <iostream> | |
using namespace std; | |
int main(){ | |
int count; | |
cin >> count; | |
while(count--){ |
This file contains 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
#!/usr/bin/env ruby | |
require 'json' | |
require 'date' | |
unless ENV['VAULT_ADDR'] | |
STDERR.puts "No VAULT_ADDR environment variable set. Set it and run me again!" | |
exit 100 | |
end |
This file contains 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Solution | |
{ | |
class Solution | |
{ | |
static void Main(string[] args) |
This file contains 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
git grep -I -E '^.+[ ]+$' |
This file contains 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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains 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 node:7.1 | |
# Install yarn | |
RUN set -x \ | |
&& curl https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
&& apt-get update && apt-get install yarn | |
WORKDIR /src/app |
This file contains 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 <new> | |
#include <cassert> | |
#define NUMBER 9 | |
template <typename T> class Node { | |
public: | |
Node<T> *parent, *left, *right; |
NewerOlder