Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
The 0.13.0
improvements to React Components are often framed as "es6 classes" but being able to use the new class syntax isn't really the big change. The main thing of note in 0.13
is that React Components are no longer special objects that need to be created using a specific method (createClass()
). One of the benefits of this change is that you can use the es6 class syntax, but also tons of other patterns work as well!
Below are a few examples creating React components that all work as expected using a bunch of JS object creation patterns (https://github.com/getify/You-Dont-Know-JS/blob/master/this%20&%20object%20prototypes/ch4.md#mixins). All of the examples are of stateful components, and so need to delegate to React.Component
for setState()
, but if you have stateless components each patterns tends to get even simpler. The one major caveat with react components is that you need to assign props
and context
to the component instance otherwise the component will be static. The reason is
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "Box type must be specified (virtualbox, vmware_desktop, parallels)" | |
exit 1 | |
fi | |
# Find all boxes which have updates | |
AVAILABLE_UPDATES=`vagrant box outdated --global 2>/dev/null | grep outdated | tr -d "*'" | cut -d ' ' -f 2` |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.
Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.
See a demo at http://stuff.dan.cx/js/filepicker/google/
This gist is created because the library i use eloquent-oauth-l5 has a pull-request (custom providers feature ) awaiting a merge | |
So here my way to use this feature and use keycloak as custom provider. | |
Inside composer.json | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/tysonlt/eloquent-oauth-l5" | |
} |
- nylas/N1 💌 An extensible desktop mail app built on the modern web.
- black-screen/black-screen A terminal emulator for the 21st century.
- shockone/black-screen A terminal emulator for the 21st century.
- ptmt/react-native-macos React Native for macOS
- docker/kitematic Visual Docker Container Management on Mac & Windows
- kitematic/kitematic Visual Docker Container Management on Mac & Windows
- davezuko/wirk-starter Get started with React, Redux, and React-Router!
- TelescopeJS/Telescope 🔭 An open-source social news app built with Meteor & React
- coryhouse/react-slingshot React + Redux starter kit / boile
DELIMITER $$ | |
CREATE FUNCTION `haversine` (lat1 DECIMAL(8,6), lng1 DECIMAL(8,6), lat2 DECIMAL(8,6), lng2 DECIMAL(8,6)) RETURNS DECIMAL(8,6) | |
BEGIN | |
DECLARE R INT; | |
DECLARE dLat DECIMAL(30,15); | |
DECLARE dLng DECIMAL(30,15); | |
DECLARE a1 DECIMAL(30,15); | |
DECLARE a2 DECIMAL(30,15); | |
DECLARE a DECIMAL(30,15); | |
DECLARE c DECIMAL(30,15); |
use Illuminate\Support\Facades\Schema; | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Schema::defaultStringLength(191); |
import mySaga from 'mySaga'; | |
import { take, fork, cancel } from 'redux-saga/effects'; | |
const sagas = [mySaga]; | |
export const CANCEL_SAGAS_HMR = 'CANCEL_SAGAS_HMR'; | |
function createAbortableSaga (saga) { | |
if (process.env.NODE_ENV === 'development') { | |
return function* main () { |