Skip to content

Instantly share code, notes, and snippets.

View bekatom's full-sized avatar
🎯
Focusing

Beka Tomashvili bekatom

🎯
Focusing
View GitHub Profile
@bekatom
bekatom / ReactHelper.class.php
Created April 22, 2016 10:51
ReactHelperClass
<?php
/**
* Created by PhpStorm.
* User: beka
* Date: 4/4/16
* Time: 11:59 AM
*/
namespace LSCore;
@bekatom
bekatom / index.js
Last active May 19, 2016 13:12
React render as service node application
module.exports = {
renderController : require('./renderController.v1.js')
};
@bekatom
bekatom / soundutil.js
Created June 2, 2016 10:07
Sound utils , browser check
(function(window){
function SoundTest(){
this.browserTest = function browserTest(){
console.log("browser test");
};
@bekatom
bekatom / couch_sync_gateway.json
Created October 15, 2016 18:27
couch_sync_gateway
{
"log": ["*"],
"databases": {
"db": {
"server": "http://192.168.5.103:8091/",
"bucket": "default",
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } }
}
}
}
@bekatom
bekatom / javascript.json
Created November 25, 2016 15:52
vscode_snippet_for_tron
"Display state tron": {
"prefix": "displayState",
"body": [
"console.tron.display({",
"\t$3name: 'State',",
"\t$3value: this.state,",
"});"
],
"description": "Log state to tron"
}
@bekatom
bekatom / Regex.md
Created December 7, 2016 14:23 — forked from interisti/Regex.md
Regex

Match unicode chars:

[^\u0000-\u007F]

Match nonunicode chars:

[!^\u0000-\u007F]
@bekatom
bekatom / couchdb_authentication.js
Created December 9, 2016 15:17
couchdb_authentication.js
var request = require("request");
var options = { method: 'POST',
url: 'http://couchbase_host:4984/dbname/_session',
headers:
{ 'postman-token': '655ec530-e665-6bdf-ac52-2bcf62ff14ab',
'cache-control': 'no-cache',
'content-type': 'application/json' },
body: { name: 'username', password: 'password' },
json: true };
@bekatom
bekatom / promise_all.js
Created March 3, 2017 13:25
Promise.all() sample
var sum = 0
var p1 = new Promise((resolve, reject) => {
console.log('p1')
sum = sum + 1
setTimeout(resolve, 1000, 'one')
})
var p2 = new Promise((resolve, reject) => {
console.log('p2')
sum = sum + 1
setTimeout(reject, 2000, 'two')
@bekatom
bekatom / oto.js
Last active March 6, 2017 20:33
oto.js
/* eslint jsx-a11y/href-no-hash: 0 */
import React, { Component, PropTypes } from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { startupRequest } from '../actions/startup'
import { fetchUserRequest, userLogoutRequest } from '../actions/userAuth'
class App extends Component {
@bekatom
bekatom / createAlphabetSorting.js
Created April 9, 2017 11:35
createAlphabetSorting with lodash
import _ from 'lodash'
/**
* Create Alpavet data structure from list of objects like : [ A : {}, B : {}]
* @param {*} list
*/
export const createAlphabetSorting = list =>
_.groupBy(
_.sortBy(list, [i => i.firstName.toLowerCase()]),
item => item.firstName.charAt(0).toUpperCase())