Skip to content

Instantly share code, notes, and snippets.

@vakrilov
vakrilov / App_Resources-Android-values-styles.xml
Last active November 5, 2015 15:57
ActionBar TabView colors - NS 1.4
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Set the text color used for ActionItems to white-->
<item name="actionMenuTextColor">#FFFFFF</item>
<!-- ... -->
</style>
<!-- ... -->
@gilbarbara
gilbarbara / .eslintrc
Last active December 31, 2016 21:37
.eslintrc configuration file for ES2015 + react
{
"parser": "babel-eslint",
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
},
"env": {
"amd": true,
"browser": true,
"es6": true,
@ivanbuhov
ivanbuhov / app.css
Last active January 4, 2017 15:05
Proof of concept NativeScript app whcih is using HomeKit API
.title {
font-size: 30;
horizontal-align: center;
margin:20;
}
button {
font-size: 42;
horizontal-align: center;
}
@dburles
dburles / .eslintrc
Last active March 24, 2017 15:44
Eslint configuration for Meteor projects
{
"env": {
"browser": true,
"meteor": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
@numtel
numtel / example.js
Last active August 4, 2023 09:07
Restart ZongJi gracefully on error
var ZongJi = require('zongji');
var RETRY_TIMEOUT = 4000;
function zongjiManager(dsn, options, onBinlog) {
var newInst = new ZongJi(dsn, options);
newInst.on('error', function(reason) {
newInst.removeListener('binlog', onBinlog);
setTimeout(function() {
// If multiple errors happened, a new instance may have already been created
@maisano
maisano / RouteTransition.jsx
Last active September 15, 2023 07:29
Using react-motion with react-router
import React, { PropTypes } from 'react';
import { TransitionMotion, spring } from 'react-motion';
/**
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3).
*
* Usage is simple, and really only requires two things–both of which are
* injected into your app via react-router–pathname and children:
*
* <RouteTransition pathname={this.props.pathname}>
@dweldon
dweldon / meteor-nginx
Last active January 22, 2024 06:53
This is an example of how to configure nginx to serve a meteor app.
server {
listen [::]:80;
listen 80;
server_name app.example.com;
return 301 https://$server_name$request_uri;
}
server {
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would