Skip to content

Instantly share code, notes, and snippets.

/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes } from 'react'; // eslint-disable-line no-unused-vars
import emptyFunction from '../../node_modules/react/lib/emptyFunction';
import mui from 'material-ui';
function withContext(ComposedComponent) {
return class WithContext {
static propTypes = {
@idoo
idoo / hosts-yt-ads
Created January 3, 2019 18:50 — forked from ewpratten/hosts-yt-ads
youtube ads hosts file
0.0.0.0 ads.doubleclick.net
0.0.0.0 s.ytimg.com
0.0.0.0 ad.youtube.com
0.0.0.0 ads.youtube.com
0.0.0.0 www.gstatic.com
0.0.0.0 gstatic.com
0.0.0.0 clients1.google.com
0.0.0.0 dts.innovid.com
0.0.0.0 googleads.g.doubleclick.net
0.0.0.0 googleads4.g.doubleclick.net
"vim.insertModeKeyBindings": [
{
"before": [
"k",
"j"
],
"after": [
"<Esc>"
]
}
@idoo
idoo / yandex_music_free_no_popup.js
Created September 2, 2019 11:58
Yandex music free mode without popups
const popupID = 'idOfBlock';
const closeButtonID = 'closeButtonId';
const checkExist = setInterval(function() {
if (document.getElementById(popupID).length) {
document.getElementById(closeButtonID).click();
}
}, 1500);
@idoo
idoo / emacs-freeze-rails-mode.lisp
Created August 15, 2018 20:44
emacs-freeze-rails-mode.lisp
Debugger entered--Lisp error: (quit)
accept-process-output(#<process rails>)
robe-start()
(progn (robe-start))
(condition-case nil (progn (robe-start)) (error nil))
(progn (condition-case nil (progn (robe-start)) (error nil)))
(unwind-protect (progn (condition-case nil (progn (robe-start)) (error nil))) (set-window-configuration wconfig))
(let ((wconfig (current-window-configuration))) (unwind-protect (progn (condition-case nil (progn (robe-start)) (error nil))) (set-window-configuration wconfig)))
(progn (fset (function yes-or-no-p) vnew) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (condition-case nil (progn (robe-start)) (error nil))) (set-window-configuration wconfig))) (if (robe-running-p) (progn (add-hook 'kill-buffer-hook (function +ruby|cleanup-robe-servers) nil t))))
(unwind-protect (progn (fset (function yes-or-no-p) vnew) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (condition-case nil (progn (robe-start)) (error nil))) (set-wind
@idoo
idoo / svim settings.vim
Created February 14, 2018 16:08
My settngs for sVim extension: https://github.com/flipxfx/sVim
let scrollstep = 120
" Unmap defaults
unmap "z i"
unmap "z o"
unmap "z 0"
unmap "g r"
" Neat shortcuts
map "v" goToInput
@idoo
idoo / svim settings.vim
Created February 14, 2018 16:07
My settngs for sVim extension: https://github.com/flipxfx/sVim
let scrollstep = 120
" Unmap defaults
unmap "z i"
unmap "z o"
unmap "z 0"
unmap "g r"
" Neat shortcuts
map "v" goToInput
@idoo
idoo / 0_reuse_code.js
Created April 7, 2016 04:11
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
@idoo
idoo / gist:5696707
Created June 3, 2013 08:01
capistrano assets
namespace :assets do
desc "Figure out modified assets."
task :determine_modified_assets, :roles => :assets_role, :except => { :no_release => true } do
set :updated_assets, capture("find #{latest_release}/app/assets -type d -name .git -prune -o -mmin -#{max_asset_age} -type f -print", :except => { :no_release => true }).split
end
desc "Remove callback for asset precompiling unless assets were updated in most recent git commit."
task :conditionally_precompile, :roles => :assets_role, :except => { :no_release => true } do
if(updated_assets.empty?)
Cannot read property 'component' of undefined
at [object Object].getThemeButton (/Users/ivan/dev/react-starter-kit/node_modules/material-ui/lib/raised-button.js:80:33)
at [object Object].getStyles (/Users/ivan/dev/react-starter-kit/node_modules/material-ui/lib/raised-button.js:92:56)
at [object Object].render (/Users/ivan/dev/react-starter-kit/node_modules/material-ui/lib/raised-button.js:144:23)
at [object Object].ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext (/Users/ivan/dev/react-starter-kit/node_modules/react/lib/ReactCompositeComponent.js:767:34)