Skip to content

Instantly share code, notes, and snippets.

@mordaha
mordaha / Chat.spec.tsx
Created June 24, 2019 04:13 — forked from vovkasm/Chat.spec.tsx
Sample test (not full, only to show code)
mport 'jest'
import { clock } from 'testing/setupFakeTimers'
import { TestController as Ctrl } from 'testing/testController'
import React from 'react'
import Renderer, { act } from 'react-test-renderer'
beforeEach(() => {
// simplifyed code
packages: [
"advanced-open-file"
"atom-beautify"
"atom-ide-ui"
"atom-import-sort"
"auto-indent"
"autoclose-html"
"autocomplete-clang"
"autocomplete-modules"
"autocomplete-solidity"
@mordaha
mordaha / Podfile
Created April 5, 2019 11:41 — forked from vovkasm/Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Sample' do
project 'Sample', {
'Debug' => :debug,
'Staging' => :release,
'Production' => :release,
}
version: "3.7"
services:
#
m1:
image: elasticsearch:6.6.0
networks:
- default
- cluster
ports:
@mordaha
mordaha / alertmanager-bot-telegram.py
Last active January 21, 2019 15:23
Simple telegram bot for alertmanager webhook alerting
#!python
# coding: utf-8
from sanic import Sanic
from sanic.response import json
from telegram import Bot
TOKEN = 'bot token'
CHAT_ID = 'chat id'
packages: [
"advanced-open-file"
"atom-beautify"
"atom-ide-ui"
"atom-import-sort"
"auto-indent"
"autoclose-html"
"autocomplete-modules"
"autocomplete-solidity"
"busy-signal"
;; ---------------------------------------------
(def sss "qwetyadddaaqweddddrtjjashdqwertyuiopoiuytrewqkjfhkasjhsajkhfy")
(defn checkCountAt
[s cnt index]
(let [s1 (subs s index (+ index cnt))
s2 (clojure.string/reverse s1)]
(= s1 s2)))
(defn findThree
#!/bin/sh
osascript -e "tell application \"Terminal\"
activate
do script \"cd /projects/$1/deployment\" in selected tab of the front window
do script \"git pull\" in selected tab of the front window
end tell"
sleep 3
// http://adventofcode.com/2017/day/11
import data from './data.json'
const steps = data.split(',')
const pairs = steps.map(s => {
switch (s) {
case 'n':
return [2, 0]
0x33a8035C9d940Ade14baA54A4028636108d52B5A