Skip to content

Instantly share code, notes, and snippets.

View kjendrzyca's full-sized avatar
🖖

Krzysztof Jendrzyca kjendrzyca

🖖
View GitHub Profile
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@hofmannsven
hofmannsven / README.md
Last active June 17, 2024 10:34
Git CLI Cheatsheet
@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active May 1, 2024 20:37
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@hojberg
hojberg / app_route_target.js
Last active September 5, 2019 09:36
Simple Aviator/React example. Read more about Aviator here: https://github.com/swipely/aviator
/** @jsx React.DOM */
var AppRouteTarget = {
setupLayout: function () {
React.renderComponent({
<App className='page-content'>,
document.querySelector('body')
});
}
};
var dom = Bloop.dom;
var Box = Bloop.createClass({
getInitialState: function() {
return { number: 0 };
},
updateNumber: function() {
this.state.number++;
},
@gr0uch
gr0uch / CLASS_ANTIPATTERN.md
Last active May 29, 2018 09:44
Reconciling ES6 `class` and constructor anti-pattern.

The use of the new keyword in JavaScript is highly divisive, some say that you should avoid it entirely. ES6 classes may seem at odds with this line of thinking, but I will show how you can have your cake and eat it too. Consider a module that exports a class:

export default class {
  constructor () { /* Do stuff here. */ }
}

The only way to get an instance out of this module, or rather an object that inherits the prototype of the class object, is to use the new keyword, which some consider harmful. Personally, I am not against new, it provides implicit understanding that the returned value is an object with inherited properties.

@limingjie
limingjie / 256 colors.md
Last active June 28, 2024 07:21
256 colors in putty, tmux/screen and vim

#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.

  • putty

    Set Connection -> Data -> Terminal-type string to xterm-256color

  • tmux

Add this line to ~/.tmux.conf

@ctolkien
ctolkien / gist:719c6ce5861c9155289c
Created June 3, 2015 13:00
ASP.Net 5 Gulp + Webpack
var gulp = require('gulp');
var webpack = require('gulp-webpack');
var ts = require('gulp-typescript');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var dnx = require("gulp-dnx");
gulp.task('webpack', function(){
return gulp.src('./src/client/main.ts')
.pipe(webpack({
output:{
@diegoconcha
diegoconcha / redux_egghead_notes.md
Last active January 18, 2022 13:23
Redux Egghead.io Notes

###Redux Egghead Video Notes###

####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree

@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):