Skip to content

Instantly share code, notes, and snippets.

View dimapaloskin's full-sized avatar
:octocat:
>_

Dima Paloskin dimapaloskin

:octocat:
>_
View GitHub Profile
@dimapaloskin
dimapaloskin / promises.re
Created November 23, 2018 16:33 — forked from lilactown/promises.re
Notes on using JavaScript Promises in ReasonML/BuckleScript
/**
* Making promises
*/
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok"));
/* Simpler promise creation for static values */
Js.Promise.resolve("easy");
Js.Promise.reject(Invalid_argument("too easy"));
@dimapaloskin
dimapaloskin / get_title_and_url.applescript
Created June 19, 2018 11:12 — forked from vitorgalvao/Get Title and URL.applescript
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Google Chrome
tell application "Google Chrome" to return title of active tab of front window
tell application "Google Chrome" to return URL of active tab of front window
-- Google Chrome Canary
@dimapaloskin
dimapaloskin / NOTES.md
Last active July 30, 2018 18:41
mpv, rapsberry pi 3 and pieman with hardware acceleration

There is just few notes Actually it's working fine outside x11. Let's continue

MPV

PIEMAN BUILD

docker run -e "ALLOW_UNAUTHENTICATED=true" -e "INCLUDES=vim,openssh-server,wget,git,unzip,rpi-update,raspi-config,locales" -e "PROJECT_NAME=candy" --privileged --rm -v $(pwd):/result -v /dev:/dev pie-new

Fix gpg

@dimapaloskin
dimapaloskin / Netflix.seek.js
Created October 18, 2017 18:32
Netflix seek
const videoPlayer = netflix
.appContext
.state
.playerApp
.getAPI()
.videoPlayer;
// Getting player id
const videoPlayer = videoPlayer
.getAllPlayerSessionIds()[0]
@dimapaloskin
dimapaloskin / App.js
Created October 6, 2017 07:52
Mobx + react-router-dom 4 auth helper
import React, { Component } from 'react'
import {
BrowserRouter as Router,
Route
} from 'react-router-dom'
import Auth from './Auth'
/* here mobx stuff */
class App extends Component {
@dimapaloskin
dimapaloskin / atom_clojure_setup.md
Created April 27, 2017 13:11 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@dimapaloskin
dimapaloskin / atom_clojure_setup.md
Created April 27, 2017 13:11 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

(function() {
console.log('test');
})();
4::/collectable/:{"request_id":"6ea329c8-6ba1-7aa7-e849-64db34bf117e","error":"['Traceback (most recent call last):\\n', ' File \"/var/www/collectrium_websocket/core/api/namespace.py\", line 63, in wrap\\n return fn(*args, **kwargs)\\n', ' File \"/var/www/collectrium_websocket/core/api/namespace.py\", line 115, in on_READ_LIST\\n result = resource.read_list()\\n', ' File \"/var/www/collectrium_websocket/core/api/read_resource.py\", line 81, in read_list\\n result = result.all()\\n', ' File \"/home/ubuntu/venv/collectrium/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2292, in all\\n return list(self)\\n', ' File \"/home/ubuntu/venv/collectrium/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2404, in __iter__\\n return self._execute_and_instances(context)\\n', ' File \"/home/ubuntu/venv/collectrium/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py\", line 2419, in _execute_and_instances\\n result = conn.execute(querycontext.statement, self._p