Skip to content

Instantly share code, notes, and snippets.

View tokenvolt's full-sized avatar

Alex Khrustalev tokenvolt

View GitHub Profile
/home/tokenvolt/Android/Sdk/tools/emulator -avd Nexus_5_API_21_x86
/home/tokenvolt/Android/Sdk/tools/adb logcat
/home/tokenvolt/Android/Sdk/tools/adb shell
/home/tokenvolt/Android/Sdk/tools/adb devices
@tokenvolt
tokenvolt / 0_reuse_code.js
Created November 3, 2013 12:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tokenvolt
tokenvolt / sublime.json
Created November 1, 2013 12:18
Sublime settings
Sublime User settings
{
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true,
@tokenvolt
tokenvolt / Curl json post request
Last active December 21, 2015 16:49
Post a json request with data using curl.
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d jsondata http://localhost:3000/api/path
@tokenvolt
tokenvolt / default_image.rb
Created July 26, 2013 23:05
Default images for carrierwave using placeholder.it
class DefaultImage
def initialize(width, height)
@width = width
@height = height
end
def create(options={})
name = options[:name] || "image_#{Time.now.to_i}"
default_format = 'png'
SELECT * FROM
(SELECT * FROM
(SELECT id FROM users) AS users_only_ids
WHERE id > 2) AS users_only_ids_filtered
ORDER BY id;
@tokenvolt
tokenvolt / Default (Linux).sublime-mousemap
Created October 28, 2015 09:36
Sublime mousemap settings for Linux
[
{
"button": "button1",
"modifiers": ["alt"],
"press_command": "drag_select",
"command": "elixir_goto_definition"
},
{
"button": "button1",
"modifiers": ["shift"],
{acl, admin, {user, "adminname", "yyyy.ru"}}.
{hosts, ["yyyy.ru"]}.
{loglevel, 4}.
{listen,
[
{5222, ejabberd_c2s, [
{access, c2s},
{shaper, c2s_shaper},
{max_stanza_size, 65536},
contextTypes:
router: React.PropTypes.func
tree: React.PropTypes.func
componentDidMount: ->
# TODO: set initial currentPath on page load
CurrentPathCursor = @props.tree.select('currentPath')
CurrentPathCursor.on 'update', (e) =>
@tokenvolt
tokenvolt / webpack.rake
Created May 11, 2015 13:18
Webpack rake tasks
namespace :webpack do
desc 'create symlinks for images and fonts'
task symlink: :environment do
images_target = Rails.root.join('app', 'assets', 'images/')
fonts_target = Rails.root.join('app', 'assets', 'fonts/')
images_link = Rails.root.join('client', 'assets', 'images/')
fonts_link = Rails.root.join('client', 'assets', 'fonts/')
FileUtils.mkdir_p(images_link)
FileUtils.mkdir_p(fonts_link)