Skip to content

Instantly share code, notes, and snippets.

View vistajess's full-sized avatar
💯

Je Vi vistajess

💯
View GitHub Profile
var Orders = function() {
var showUuid = function(uuid) {
$('#remote_uuid').html(uuid);
};
var mustacheRender = function(temp,obj,target) {
var template = temp.html();
Mustache.parse(template);
var rendered = Mustache.render(template,obj);
@vistajess
vistajess / gist:fde54734086a59becc6c
Created December 14, 2015 12:56
ecommerce_orders.php
<?php
include_once 'includes/headscript.php';
include_once '../config/config_pdo_connection.php';
include_once '../support/courier_class.php';
include_once '../config/directory.php';
$page = $_REQUEST['page'] ?: 1;
$curl = curl_init();
$curlConfig = array(
// CURLOPT_URL => API_V2 . '/users/' . $_SESSION['beone_new_user_id'] . '/orders?page=' . $page,
// CURLOPT_URL => 'http://10.10.2.17:7000/me/orders?access_token=' . $_SESSION['access_token'] . '&page=' . $page,
-cur_console:s66H -cur_console:d:c:\xamp\htdocs\current-platform cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd"
-cur_console:s66H -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
-cur_console:s50H -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
> -cur_console:bs50V -cur_console:d:c:\xamp\htdocs\current-platform -cur_console:C:"%ConEmuDrive%\Program Files (x86)\Git\etc\git.ico" "%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i
@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";
@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();
}
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){
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
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 9,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 5,
"line_padding_top": 5,
"rulers":
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: {
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) {