Skip to content

Instantly share code, notes, and snippets.

View bsconfig.json
{
"name": "some-name",
"version": "0.0.1",
"namespace": false,
"sources": {
"dir": "src",
"subdirs": true
},
"ignored-dirs": ["./ignored-folder"],
"bs-dependencies": ["reason-react"],
View gist:387901eb0c4a07c70f04feed6d011cbb
git config --global alias.tree 'log --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"'
@maxlibin
maxlibin / # Sublime Emmet JSX Reactjs.md
Created May 24, 2017 — forked from max-mykhailenko/# Sublime Emmet JSX Reactjs.md
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin
View # Sublime Emmet JSX Reactjs.md

This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/

Thanks, @wesbos

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
@maxlibin
maxlibin / simple-react-example.js
Last active Mar 9, 2017
simple react example
View simple-react-example.js
// http://mikelambert.me/react/?#rVTBbptAED2brxhxAilZq9fERqocVYrUqlLcWxRVBCYxDbB0d3BiWfx7Z3cxrGkS5xAJyzAwb968fTNZmWoNv2QuV5uizAFfCOtcww2mGYmVrBpZY02wDwAyWWtSbUZSRY2SjY5NdKbbBg+BSw50/OPrEemasLquc3yJ0H2KolG4ZbwrfEjbkiKbAECbQguLII7SvHhhAvEIr5gml7W45olaVUf2HmBRFsnez2XADhb3LZGsgXYNLkP3EIKsV2WRPS3d9351cc81LYW4S84Xc5eRLOaMbgs5Nl0QZIOI3wtN+hNF3KR1XuINVnKL0e9tWvb9es0p+9Kwdh942adkasskmM2mSmlRpU0UmdszcLLDMoHFaBJfpV44n6gvHBiY5d6dQOES7F8HT7gb7udJ3AUzpjQ3nN4Q92v+Kf60uvQSakoJYQn7XhLD8wLC0D5203NYt/dVQafMPD0gbbO+SVVFY02rtO9+jbQ2L6LXqcRTLiv+e8QPcSmRLBr3iYJSxccn2Ckt/qfGwMGe10en7YFb4zly6iz34BnCxTxDQJf0aZxY1E1L/TwSn6ydRtvXMYqLHaGAbaA336iocdKIfzTw7hjChF00zPKhg7lpYeK7wLfeu76bWM8f0am/iLH0xe3d1F9Ti3mj/o5FHJongQ0IJpOlFN0akLt49I/FOrFYBsMo1Mx7in05aa2vqBveoQ7nDL7YWm/Snr3O+nWa7/ouL7beYTfJBstSPsOzVLyjDD7wRajJCiWEWMybJBgzxoVt196RmSynDsblemrP+b47LKtx8k9OhZ8/uHJocDSl9d/Vzx+iV8bW4uQzyGXWVmxJ8bdFtVtjidaNofijz5XJOpct8byFMe+Gfw==
class TodoChild extends React.Component {
constructor(props){
super(props);
}
getItemIndex(e){
e.prev
View gist:11244599
var g = require('gulp'),
sass = require('gulp-ruby-sass'),
notify = require("gulp-notify"),
changed = require("gulp-changed"),
sftp = require("gulp-sftp"),
watch = require('gulp-watch');
sources = {
sass: "sass/*.scss",
js: "coffee/*.coffee",
@maxlibin
maxlibin / gist:7716158
Created Nov 30, 2013
change wordpress phpmyadmin content
View gist:7716158
UPDATE wp_posts SET post_content = REPLACE(
post_content,
'something',
'to replace here'
)
@maxlibin
maxlibin / nodequery.js
Last active Dec 24, 2015
Node.js mongoose query if item exist in array,and insert and update if does not...
View nodequery.js
exports.user_post_emails = function(req, res){
var emails = [];
Mongoose_Collection.findOne({userId: req.user._id}, function(err, user){
if(!user){
emails[0] = req.body.emails;
new Mongoose_Collection({
emails: emails,
userId:req.user._id
You can’t perform that action at this time.