Skip to content

Instantly share code, notes, and snippets.

View omitobi's full-sized avatar
👑
The faithful shall receive the crown of life from Jesus

omitobi omitobi

👑
The faithful shall receive the crown of life from Jesus
View GitHub Profile
@bradtraversy
bradtraversy / docker_wordpress.md
Last active June 14, 2026 08:51
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@tonila
tonila / CustomBuilder.php
Last active September 9, 2020 12:12
Mass (bulk) insert or update on duplicate for Laravel 5.x
<?php
namespace App\Classes\Database;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Arr;
class CustomBuilder extends Builder
{
public function insertOrUpdate(array $values)
@DataTurks
DataTurks / Dataturks_to_Spacy.py
Created May 27, 2018 10:13
Creates NER training data in Spacy format from JSON downloaded from Dataturks.
import argparse
import sys
import os
import json
import logging
import pickle
############################################ NOTE ########################################################
#
@bricksroo
bricksroo / App.vue
Last active February 7, 2024 13:03
Reveal.js in Vue
<template>
<div id="app">
<!-- <img src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/> -->
<div class="reveal">
<div class="slides">
<section>Single Horizontal Slide</section>
<section>
<section>Vertical Slide 1</section>
<section>Vertical Slide 2</section>
@mitchkramez
mitchkramez / homebrew_multiple_mysql_versions.md
Last active January 27, 2021 15:24 — forked from benlinton/multiple_mysql_versions_for_development.md
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions with Homebrew

For homebrew version 1.5.12 - WIP... not quite working yet.

brew -v # => Homebrew 1.5.12

Install the current version of mysql.

# Install current mysql version

brew install mysql

@Geoyi
Geoyi / python_environment_setup.md
Created January 20, 2018 19:01 — forked from wronk/python_environment_setup.md
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. That way you can keep each project in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. This intermediate guide covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.

Use cases

  1. Working on 2+ projects that each have their own dependencies; e.g., a Python 2.7 project and a Python 3.6 project, or developing a module that needs to work across multiple versions of Python. It's not reasonable to uninstall/reinstall modules every time you want to switch environments.
  2. If you want to execute code on the cloud, you can set up a Python environment that mirrors the relevant
@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active March 15, 2026 06:11
Homebrew Symlink errors in Mac OSX High Sierra
@jgrossi
jgrossi / AttachJwtToken.php
Last active August 14, 2021 18:14
AttachJwtToken.php
<?php
namespace Tests\Concerns;
use App\Models\User;
use Tymon\JWTAuth\Facades\JWTAuth;
trait AttachJwtToken
{
/**
@fgilio
fgilio / axios-catch-error.js
Last active February 11, 2026 16:18
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@sergomet
sergomet / GoogleDriveServiceProvider.php
Created April 1, 2017 07:01 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.