Skip to content

Instantly share code, notes, and snippets.

(function () {
'use strict';
angular.module('app').controller('plansController', plansController);
plansController.$inject = ['$rootScope', '$scope', '$http', '$q', '$document', 'appConstants', '$timeout', '$state', '$modal', '$stateParams', 'uiGridConstants', 'productionPlansService', 'localStorageService'];
function plansController($rootScope, $scope, $http, $q, $document, appConstants, $timeout, $state, $modal, $stateParams, uiGridConstants, productionPlansService, localStorageService) {
$document[0].title = $state.current.title;
var vm = this;
vm.appConstants = appConstants;
require('dotenv').config();
var path = require("path");
var webpack = require("webpack");
var stringify = require('stringify-object-values');
var PROD = JSON.parse(process.env.PROD_ENV || '0');
module.exports = {
entry: './src/app/app.js',
output: {
path: __dirname + '/build/',
//UI Component
<topbar-menu is-valet-online="$ctrl.isValetOnline" change-status-func="$ctrl.toggleVisibilityStatus()"></topbar-menu>
// JS Code
'use strict';
class ValetDashboardController {
/*@ngInject*/
constructor($q, $scope, $cookies , Pusher) {
class SlotService {
/*@ngInject*/
constructor($http,CONFIG_CONSTANTS,$q, AuthService) {
this.API_URL = CONFIG_CONSTANTS.API_URL;
this.$http = $http;
this.$q = $q;
this.api_token = AuthService.api_token;
}
getSlotList(floorId) {
require('dotenv').config();
var path = require("path");
var webpack = require("webpack");
var stringify = require('stringify-object-values');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin');
var PROD = JSON.parse(process.env.PROD_ENV || '1');
module.exports = {
entry: './src/app/app.js',
output: {
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 9,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 5,
"line_padding_top": 5,
"rulers":
Basics
1.Constants for ActionTypes
2.Actions based on actiontype
3.Reducer depends on constant
4.Store from redux
5.Views with Provider redux
6.connect state to props with connect in react-redux
Async HTTP Request using Redux
1.crete an action and import `axios` or other HTTP Library. Actions must have request, success and error status
var arr = ["aaa","bbb"];
console.time('native');
for (var i=0; i < arr.length; i++) {
console.log(arr[i]);
};
console.timeEnd('native');
console.time('jquery');
$.each(arr, function(i,v){
@vistajess
vistajess / gist:550e3b7c564a82d4cc87
Created December 31, 2015 19:24
Facebook autolike script
var likeButton = document.querySelectorAll('._48-k');
for(var i=0 in likeButton) {
// trigger the anchor element
likeButton[i].click();
}
@vistajess
vistajess / gist:f54989f61c82642663c5
Last active December 31, 2015 18:44
Send a Facebook Chat to Friends using Browser Console
// target the every anchor element (friend in friendlist)
var elem = document.querySelectorAll("a._55ln");
for(var i=0 in elem) {
// trigger the anchor element
elem[i].click();
//target the text area
var textArea = document.getElementsByClassName("uiTextareaAutogrow _552m");
var chatBox = textArea[0];
// message value here
chatBox.value = "Hello, This is a test chat from console please dont reply";