Skip to content

Instantly share code, notes, and snippets.

@iBasit
iBasit / WAXP.js
Created December 6, 2022 22:59 — forked from shaneapen/WAXP.js
WhatsApp Group Contacts Exporter
WAXP = (function(){
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var SCROLL_INTERVAL = 600,
SCROLL_INCREMENT = 450,
AUTO_SCROLL = true,
NAME_PREFIX = '',
UNKNOWN_CONTACTS_ONLY = false,
MEMBERS_QUEUE = {},
@iBasit
iBasit / Contact.js
Last active September 13, 2018 11:43
tutorial example
import React from 'react';
import { Formik, Field, Form } from 'formik';
import {bindActionCreators} from "redux";
import connect from "react-redux/es/connect/connect";
import { contactCompleted, contactHasError, contactLoading, saveContact } from "../actions/contactAction"
import * as Yup from 'yup';
/**
* TODO Contact us form
* √ - first name, last name and email request
// Render Prop
import React from 'react';
import { Formik } from 'formik';
const Basic = () => (
<div>
<h1>My Form</h1>
<p>This can be anywhere in your application</p>
{/*
The benefit of the render prop approach is that you have full access to React's
@iBasit
iBasit / loginWithCustomToken.ts
Created July 20, 2017 12:51
firebase login with custom token example
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
// Do not import from 'firebase' as you'll lose the tree shaking benefits
import * as firebase from 'firebase/app';
@Injectable()
export class AuthService {
private currentUser: firebase.User;
<style>
td {
border: 1px solid black;
margin: 2px;
padding: 2px;
}
.marked {
background-color: red;
}
$regions = array();
$regions[65] = array('id' => 65, 'parent_id' => 44, 'name' => "Shoreditch");
$regions[77] = array('id' => 77, 'parent_id' => 5, 'name' => "England");
$regions[100] = array('id' => 100, 'parent_id' => 0, 'name' => "Europe");
$regions[5] = array('id' => 5, 'parent_id' => 100, 'name' => "United Kingdom");
$regions[44] = array('id' => 44, 'parent_id' => 77, 'name' => "London");
function getChild ($parent_id = 0)
{
# current json
"_embedded": {
"items": [
{
"0": {
"id": 5,
...
},
"isFeedbackAdded": "0"
{
"search" : {
"mappings" : {
"delivery" : {
"_meta" : {
"model" : "AppBundle\\Entity\\Delivery"
},
"dynamic_date_formats" : [ ],
"properties" : {
"categories" : {
{
"error": {
"root_cause": [{
"type": "script_exception",
"reason": "Error evaluating pricing",
"script_stack": [],
"script": "",
"lang": "groovy"
}],
"type": "search_phase_execution_exception",
/**
* @var Vehicle $vehicle
*/
$vehicle = false;
foreach ($user->getVehicles() as $userVehicle)
{
if ($userVehicle->getType() == $selectedVehicleType)
{
$vehicle = $userVehicle;
break;