Skip to content

Instantly share code, notes, and snippets.

View onurkose's full-sized avatar
😄

Onur Köse onurkose

😄
View GitHub Profile
#!/bin/bash
# Mixpanel batch import script
# It allows you to import data from one Mixpanel project to another
# Usage: ./mixpanel_batch_import.sh input_file.json project_id api_secret
# Api secret is base64 encoded string generated using your Mixpanel Username&Secret
if [ "$#" -lt 3 ]; then
echo "Usage: $0 <input_file.{json/txt}> <project_id> <api_secret>"
exit 1
@onurkose
onurkose / machine.js
Created August 24, 2021 19:52
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@onurkose
onurkose / machine.js
Last active August 23, 2021 20:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
<?php
namespace App\Firebase;
use App\Models\User\User;
use Exception;
use Firebase\Auth\Token\Verifier;
class Guard
{
<?php
namespace App\GraphQL\Mutations\System\TranslationManager\Projects;
// Project Model
use App\System\TranslationManager\Project\Project;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Mutation;
<?php
namespace App\GraphQL\Types\InputObjects;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Type as GraphQLType;
class LocaleInputObjectType extends GraphQLType
{
protected $inputObject = true;
<?php
namespace App\GraphQL\Types\System\TranslationManager;
// Project Model
use App\System\TranslationManager\Project\Project;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Type as GraphQLType;
<?php
namespace App\GraphQL\Queries\System\TranslationManager;
// Project Model
use App\System\TranslationManager\Project\Project;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Query;
use Rebing\GraphQL\Support\SelectFields;
@onurkose
onurkose / LocalesType.php
Last active May 20, 2018 08:55
How to mutate Arrays of Objects with vue-apollo
<?php
namespace App\GraphQL\Types\System\Localization;
// Locale Model
use App\System\Localization\Locale;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Type as GraphQLType;
class LocalesType extends GraphQLType
@onurkose
onurkose / PhoneNumberLine.vue
Last active December 27, 2021 23:28
Dynamic component creation in Vue.js
<template>
<div>
<div v-for="(line, index) in lines" :key="index" class="row">
<div class="col-lg-6">
<div class="row">
<div class="col-2">
<q-select
v-model="line.countryCode"
label="Country Code"
:options="countryPhoneCodes"