Skip to content

Instantly share code, notes, and snippets.

@surendharreddy
surendharreddy / mutlidex-application.java
Created September 13, 2018 02:37
Add mutlidex support to react native android application
// Add `implementation 'com.android.support:multidex:1.0.3'` to dependencies in android/app/build.gradle
// Update MainApplication.java with following code with following
import android.support.multidex.MultiDexApplication;
public class MainApplication extends MultiDexApplication implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected List<ReactPackage> getPackages() {
/**
* @providesModule PatientList
*/
import NavigationBar from 'react-native-navbar';
import NavigationButtons from 'NavigationButtons';
import React, { ListView, Navigator, StyleSheet, Text, TextInput, TouchableHighlight, View } from 'react-native';
import { connect } from 'react-redux/native'
@connect(state => ({
patients: state.patients
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@yocontra
yocontra / gulpfile.js
Last active January 1, 2016 00:29
gulpfile for a simple livereload static web server. this is a proof of concept that uses no plugins to do the work. obviously there are plugins that eliminate almost all of this code but i thought it would be a fun demonstration. this will trigger livereload any time any file is modified in the current working directory. it also serves the curre…
var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var path = require('path');
var tinylr = require('tiny-lr');
var createServers = function(port, lrport) {
var lr = tinylr();
lr.listen(lrport, function() {
gutil.log('LR Listening on', lrport);
@polarblau
polarblau / baseline.sass
Last active December 19, 2015 04:59
Simple Sass helper for baseline grid value calculations.
// set base font size if not set
// normalize.css standard value
$base-font-size: 16px !default
// define scope font size to make it available globally
$__scope: $base-font-size
@function relative($arguments)
// ensure that the scope size is set
$__scope: $base-font-size !default
@revolunet
revolunet / angularjs.md
Last active October 22, 2021 00:36
BeerJS + AngularJS Paris le 25/2

AngularJS best ressources

Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)

Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !

@wpsmith
wpsmith / wps_enqueue_jquery.php
Last active March 19, 2018 20:55
PHP: Enqueue Google CDN jQuery with fallback to WordPress
<?php
add_action( 'wp_enqueue_scripts', 'wps_enqueue_jquery' );
/**
* Enqueue jQuery from Google CDN with fallback to local WordPress
*
* @link http://codex.wordpress.org/Function_Reference/wp_enqueue_script
* @link http://codex.wordpress.org/Function_Reference/wp_register_script
* @link http://codex.wordpress.org/Function_Reference/wp_deregister_script
* @link http://codex.wordpress.org/Function_Reference/get_bloginfo
* @link http://codex.wordpress.org/Function_Reference/is_wp_error
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx