Skip to content

Instantly share code, notes, and snippets.

View kikoseijo's full-sized avatar
💭
42Malaga Student

Kiko Seijo kikoseijo

💭
42Malaga Student
View GitHub Profile
@kikoseijo
kikoseijo / 2019_09_03_141329_create_form_requests_table.php
Last active September 3, 2019 15:21
Laravel Contact Form Requests
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFormRequestsTable extends Migration
{
/**
* Run the migrations.
#!/usr/bin/env bash
# #
# # Install main dependencies on CentOS:
# # Python 3.4.5, CMake 3.10.0, OpenCV 3.3.1
# # Author Andrii Lundiak (landike@gmail.com)
# #
# https://github.com/ageitgey/face_recognition/issues/191
# https://github.com/opencv/opencv/issues/8471
@kikoseijo
kikoseijo / Admin-FormResponseController.php
Last active April 12, 2018 23:31
Laravel Contact Form - Form request with validations, back office admin views, recipients database relationship, ajax request using Axios, tests provided by Laravel Dusk. Includes Model files and migrations.
<?php
namespace App\Http\Controllers\Back;
use App\Mail\Admin\ContactFormSubmitted;
use App\Models\FormResponse;
use App\Repositories\FormResponseRepository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
@kikoseijo
kikoseijo / BackupController.php
Last active October 15, 2023 18:01
Laravel Spatie backup with controller routes and views
<?php
namespace App\Http\Controllers;
use Alert;
use Artisan;
use Carbon\Carbon;
use Log;
use Spatie\Backup\Helpers\Format;
use Storage;
@kikoseijo
kikoseijo / BulmaFramework.php
Created February 18, 2018 19:14
Laravel Former custom framework for Bulma.io compatibility
<?php
namespace Helpers;
use Former\Interfaces\FrameworkInterface;
use Former\Traits\Field;
use Former\Traits\Framework;
use HtmlObject\Element;
use Illuminate\Container\Container;
use Illuminate\Support\Str;
@kikoseijo
kikoseijo / App.js
Created February 11, 2018 16:54
React navigation wrapper
import NavigatorService from './src/libs/navigator';
renderMain() {
const { token } = this.state;
if (token && token.length > 10) {
return (
<StackNavigator
ref={navigatorRef => {
NavigatorService.setContainer(navigatorRef);
}}
@kikoseijo
kikoseijo / NewsList.js
Last active February 25, 2018 21:30
React Relay Modern QueryRenderer + PaginationController.
export default createPaginationContainer(
NewsList,
{
viewer: graphql`
fragment NewsList_viewer on User {
news(first: $count, after: $after) @connection(key: "NewsList_news") {
edges {
node {
id
#!/bin/bash
# Copyright 2018 Sunnyface.com.
#
echo "running commands on" && pwd
rm -rf ios/build
rm -rf node_modules && npm install
node_modules/react-native/packager/packager.sh --reset-cache
watchman watch-del-all
@kikoseijo
kikoseijo / certToSimulator.sh
Last active February 4, 2018 23:26
Easy way to add valet secured sites self signed certificates to iOS simulators
#!/bin/bash
# PREREQUISITES:
# have this repo under know directory
# https://github.com/ADVTOOLS/ADVTrustStore.git
# Add valet certificates to ios simulators
echo "Im Done..;-)"
ls -la ~/.valet/Certificates
echo "Which one? (without extension name)"
read CERT_NAME
cd ~/kscripts/ADVTrustStore
import { AsyncStorage } from 'react-native';
// retrieve
export const get = async key => await AsyncStorage.getItem(key);
// store
export const set = async (key, value) => {
await AsyncStorage.setItem(key, value);
};