A Pen by Sankalp Singha on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(-> | |
token = $('meta[name="csrf-token"]').attr('content') | |
$.ajaxPrefilter((options, originalOptions, xhr)-> | |
xhr.setRequestHeader('X-CSRF-Token', token) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- model | |
some sort of constant hash: | |
HASH_NAME = { | |
0 => "Choose:", | |
1 => "On-Campus Recruiting - CSO",· | |
2 => "CSO Staff Referral", | |
3 => "Faculty Contact",· | |
4 => "Career Day",· | |
5 => "CSO Summer Job Listing",· | |
6 => "Alumni Contact",· |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View } from 'react-native'; | |
import { createStore, applyMiddleware } from 'redux'; | |
import { logger } from 'redux-logger'; | |
import { Provider } from 'react-redux'; | |
import Reducers from './reducers/'; | |
import LoginForm from './components/LoginForm'; | |
class App extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View } from 'react-native'; | |
import { Hoshi } from 'react-native-textinput-effects'; | |
import Button from 'react-native-button'; | |
import { connect } from 'react-redux'; | |
import { emailChanged, passwordChanged } from '../actions/'; | |
class LoginForm extends Component { | |
emailChanged(value) { | |
this.props.emailChanged(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global fetch:false*/ | |
export const emailChanged = (email) => { | |
return { | |
type: 'EMAIL_CHANGED', | |
payload: email | |
}; | |
}; | |
export const passwordChanged = (password) => { | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const INITIAL_STATE = { | |
email: '', | |
password: '', | |
authentication_token: '', | |
username: '', | |
errorFlag: false, | |
spinner: false | |
}; | |
export default (state = INITIAL_STATE, action) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Text, ActivityIndicator } from 'react-native'; | |
import { Hoshi } from 'react-native-textinput-effects'; | |
import Button from 'react-native-button'; | |
import _ from 'lodash'; | |
import { connect } from 'react-redux'; | |
import { emailChanged, passwordChanged, loginUser } from '../actions/'; | |
class LoginForm extends Component { | |
onButtonSubmit() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertToRoman(num) { | |
var firstTable = { | |
0: '', | |
1: 'I', | |
2: 'II', | |
3: 'III', | |
4: 'IV', | |
5: 'V', | |
6: 'VI', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Simon Game</title> | |
<style media="screen"> | |
*{ | |
margin: 0; | |
padding: 0; | |
} |
OlderNewer