Skip to content

Instantly share code, notes, and snippets.

View ivan-hilckov's full-sized avatar
🤔

Ivan Hilkov ivan-hilckov

🤔
View GitHub Profile
@ivan-hilckov
ivan-hilckov / Readme.md
Created October 16, 2016 08:24 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
curl 'http://localhost:8000/api/v1/entry/comment/'
-H 'Pragma: no-cache'
-H 'Origin: http://localhost:8000'
-H 'Accept-Encoding: gzip, deflate'
-H 'Accept-Language: en-US,en;q=0.8,ru;q=0.6'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36'
-H 'Content-Type: application/json'
-H 'Accept: application/json, text/javascript, */*; q=0.01'
-H 'Cache-Control: no-cache'
-H 'X-Requested-With: XMLHttpRequest'
import React from 'react';
import { PropTypes, assertPropTypesDecorator } from 'iv-react-prop-types';
const VIEWBOX_REGEXP = /viewBox="([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)"/i;
function getViewBoxFromSvgHtml (html) {
const viewBoxMatch = VIEWBOX_REGEXP.exec(html);
if (viewBoxMatch) {
return [ parseFloat(viewBoxMatch[3]) || 0, parseFloat(viewBoxMatch[4]) || 0 ];
➜ nginx sudo iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere
(snob) ~/projects/snob/snob3 on master [dirty]
⚡ ./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
(snob) ~/projects/snob/snob3 on master [dirty]
⚡ ./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
@ivan-hilckov
ivan-hilckov / tmux-cheatsheet.markdown
Created September 14, 2016 09:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
Clear the Key Value Store ... [Done]
Delete all thumbnail files in THUMBNAIL_PREFIX ... Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/bzzz/projects/snob/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
Environment:
Request Method: PATCH
Request URL: http://api.idwell.nxngame.com/api/profile/34/
Django Version: 1.10
Python Version: 3.5.1
Installed Applications:
['django.contrib.sites',
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import i18n from 'i18n/translation';
const mapStateToProps = (state) => ({
routing: state.routing,
filters: state.filters,
});