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
server { | |
listen 7777; | |
location / { | |
root /tmp/www; | |
index index.html; | |
try_files $uri @lua; | |
} | |
location /api { |
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/sh | |
SRC=$(git rev-parse --show-toplevel)/src/client | |
#========================================================== | |
# Check if I forgot to remove 'only' keyword from tests. | |
# To make sure that before commit run all tests | |
only=`grep -c -h -r --include "*.spec.js" -E "(describe|it)\.only" $SRC/src | awk -F ':' '{x +=$0}; END {print x}'` | |
if (( $((only)) > 0 )) | |
then | |
echo 'Remove ONLY from tests.' |
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
{ | |
... | |
"scripts": { | |
"test": "mocha --recursive --require test_setup.js src/**/*.spec.js", | |
}, | |
"devDependencies": { | |
"babel": "5.6.14", | |
"babel-core": "5.6.20", | |
"babel-plugin-rewire": "0.1.5", | |
"chai": "3.0.0", |
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
// Type definitions for fixed-data-table 0.6.0 | |
// Project: https://github.com/facebook/fixed-data-table | |
/// <reference path="../react/react.d.ts"/> | |
declare module FixedDataTable { | |
export var version: string; | |
export interface TableProps extends __React.Props<Table> { | |
/** |
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 class Counter extends React.Component<any, any> { | |
constructor(props) { | |
super(props); | |
this.state = {count: props.initialCount}; | |
} | |
tick = () => { | |
this.setState({count: this.state.count + 1}); | |
} | |
render() { | |
return ( |
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
import * as Immutable from 'immutable'; | |
const UserRecord = Immutable.Record({ | |
id: '', | |
age: 0 | |
}, 'User'); | |
class User extends UserRecord { | |
public readonly id: string; | |
public readonly age: number; |
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.IO; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.Configuration; |
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
name: Gatsby Build and Publish | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
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 diagrams import Diagram | |
from diagrams import Group | |
from diagrams.yc.infrastructure import Compute | |
from diagrams.yc.serverless import ServerlessFunctions | |
from diagrams.yc.serverless import ServerlessTriggers | |
from diagrams.yc.serverless import YMQ | |
with Diagram("Create Snapshots", show=False, direction="LR", curvestyle="polyline"): | |
cron = ServerlessTriggers("Cron Trigger") | |
spawn = ServerlessFunctions("Spawn Function") |
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
import {DiskService, SnapshotService} from "yandex-cloud/api/compute/v1"; | |
const FOLDER_ID = process.env.FOLDER_ID; | |
export async function handler(event, context) { | |
const snapshotService = new SnapshotService(); | |
const diskService = new DiskService(); | |
const diskList = await diskService.list({ | |
folderId: FOLDER_ID, |
OlderNewer