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
# | |
# Clean and minimalistic Bash prompt | |
# Author: Artem Sapegin, sapegin.me | |
# | |
# Inspired by: https://github.com/sindresorhus/pure & https://github.com/dreadatour/dotfiles/blob/master/.bash_profile | |
# | |
# Notes: | |
# - $local_username - username you don’t want to see in the prompt - can be defined in ~/.bashlocal : `local_username="admin"` | |
# - Colors ($RED, $GREEN) - defined in ../tilde/bash_profile.bash | |
# |
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 <cstdlib> | |
#include <iostream> | |
#include <sorter.hpp> | |
int main (int argc, char *argv[]) { | |
int* a = new int[10]; | |
for (int i = 0; i < 10; i++) { | |
a[i] = rand(); | |
} |
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
bool double_eq(const double a, const double b) { | |
return std::fabs(a - b) < std::numeric_limits<double>::epsilon(); | |
} | |
double average(const vector<int> &numbers) { | |
int sum = std::accumulate(numbers.begin(), numbers.end(), 0); | |
return sum / numbers.size(); | |
} | |
int main() { |
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
module Playground | |
using RegionTrees | |
import StaticArrays: SVector | |
const Point = SVector{2, Float32} | |
root = Cell(SVector(0., 0), SVector(1., 1), [ | |
Point(0, 0), | |
Point(.5, .5), |
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
cmake_minimum_required(VERSION 3.12) | |
project(popen) | |
set(CMAKE_CXX_STANDARD 11) | |
add_executable(popen main.cpp) | |
install(FILES hello.py | |
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |
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
lerna(verbose) GitUtilities.isInitialized () | |
lerna(verbose) GitUtilities.isInitialized () => true | |
lerna(verbose) GitUtilities.getTopLevelDirectory() | |
lerna(verbose) GitUtilities.getTopLevelDirectory() => "." | |
lerna(verbose) FileSystemUtilities.existsSync("./lerna.json") | |
lerna(verbose) FileSystemUtilities.existsSync("./lerna.json") => true | |
lerna(verbose) FileSystemUtilities.readFileSync("./lerna.json") | |
lerna(verbose) FileSystemUtilities.readFileSync("./lerna.json") => "{\n \"lerna\": \"2.0.0-beta.38\",\n \"version\": \"6.23.1\",\n \"changelog\": {\n \"repo\": \"babel/babel\",\n \"labels\": {\n \"tag: spec compliancy\": \":eyeglasses: Spec Compliancy\",\n \"tag: breaking change\": \":boom: Breaking Change\",\n \"tag: new feature\": \":rocket: New Feature\",\n \"tag: bug fix\": \":bug: Bug Fix\",\n \"tag: polish\": \":nail_care: Polish\",\n \"tag: documentation\": \":memo: Documentation\",\n \"tag: internal\": \":house: Internal\"\n }\n },\n \"cacheDir\": \".c |
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 node | |
require("../lib/babel"); |
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
export function transform(filename, code, opts) { | |
opts = defaults(opts || {}, index.opts); | |
opts.filename = filename; | |
const result = babel.transform(code, opts); | |
result.filename = filename; | |
result.actual = code; | |
return result; | |
} |
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
const fn = commander.outDir ? dirCommand : fileCommand; | |
fn(commander, filenames, opts); |
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
const square = n => n * n |
NewerOlder