Skip to content

Instantly share code, notes, and snippets.

View ihor-lev's full-sized avatar
😎

Ihor Kysylevych ihor-lev

😎
View GitHub Profile
@ihor-lev
ihor-lev / a_sublime3_legacy_theme.md
Last active July 5, 2019 09:57
Sublime 3 legacy UI

Legacy Theme

https://packagecontrol.io/packages/Theme%20-%20Legacy

Legacy color scheme

  1. Install "Colorsublime"
  2. Install at least one colorsublime theme: Ctrl+Shift+P "Colorsublime: Install theme"
  3. Create iPlastic.tmTheme file and put it in colorsublime folder
  4. Install iPlastic with Colorsublime
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active May 20, 2024 08:01
Fix Sublime Text Home and End key usage on Mac OSX

Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.

Fix Home and End keys to move the cursor to the beginning and end of lines.

Preferences > Key Bindings - User

Adding the following to the array:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
@ihor-lev
ihor-lev / jquery-es6-example.md
Created November 20, 2019 16:29 — forked from mgol/jquery-es6-example.md
jQuery ES6 modules example usage

jQuery source is now authored using ES6 modules. It's possible to use them directly in the browser without any build process.

To test it locally, first clone the jQuery repository:

git clone git@github.com:jquery/jquery.git

Then, write the following index.html file:

@ihor-lev
ihor-lev / app.component.ts
Created March 30, 2020 08:19 — forked from abarrak/app.component.ts
Dynamically set page title based on active route in Angular 6+ .. (Corrected & Simplified Version)
import { Component, OnInit } from '@angular/core';
import { TitleService } from './shared/title/title.service';
@Component({
selector: 'ny-app',
templateUrl: './app.component.html',
styles: [],
})
export class AppComponent implements OnInit {
@ihor-lev
ihor-lev / curl.md
Created June 5, 2020 11:02 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@ihor-lev
ihor-lev / gist:b27031c358ec737720010111cc8966b4
Created September 29, 2020 13:09 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@ihor-lev
ihor-lev / tweet.js
Created October 27, 2020 17:13 — forked from jaredpalmer/tweet.js
send-tweet.js
/*
* Code snippet for posting tweets to your own twitter account from node.js.
* You must first create an app through twitter, grab the apps key/secret,
* and generate your access token/secret (should be same page that you get the
* app key/secret).
* Uses oauth package found below:
* https://github.com/ciaranj/node-oauth
* npm install oauth
* For additional usage beyond status updates, refer to twitter api
* https://dev.twitter.com/docs/api/1.1