Skip to content

Instantly share code, notes, and snippets.

View elchroy's full-sized avatar

Elisha-Wigwe Chijioke O. elchroy

  • Lagos, Nigeria
View GitHub Profile
@harishrkpatel
harishrkpatel / 2018_12_29_113449_create_csv_data_table.php
Last active June 12, 2024 07:08
Backpack For Laravel Import Functionality
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCsvDataTable extends Migration
{
/**
* Run the migrations.

Laravel alternatives in NodeJS

These are alternative packages/frameworks in NodeJS that cover some of the primary features in Laravel. This is by no means a comprehensive list of Laravel features (or a comprehensive list of NodeJS alternatives).

Depending on your perspective, this list either shows how it's possible to switch from Laravel to NodeJS or shows why you'd want to stay with Laravel 😃


Full stack framework alternatives: Nest, Adonis

@paolocarrasco
paolocarrasco / README.md
Last active July 23, 2024 14:37
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 23, 2024 19:37
crack activate Office on mac with license file
@jazibsawar
jazibsawar / delete_custom_post_type.php
Created October 2, 2017 12:28
WordPress $wpdb: Delete all posts of a custom post type with its associated meta data (taxonomies, post meta) using SQL query & $wpdb
<?php
function delete_custom_posts($post_type = 'post'){
global $wpdb;
$result = $wpdb->query(
$wpdb->prepare("
DELETE posts,pt,pm
FROM wp_posts posts
LEFT JOIN wp_term_relationships pt ON pt.object_id = posts.ID
LEFT JOIN wp_postmeta pm ON pm.post_id = posts.ID
WHERE posts.post_type = %s
@karpathy
karpathy / min-char-rnn.py
Last active July 22, 2024 04:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ecasilla
ecasilla / clear_mongo.js
Last active December 25, 2021 20:44
Clear mongo db before mocha specs
var config = require('path/to/config');
var mongoose = require('mongose');
process.env.NODE_ENV = 'test';
before(function (done) {
function clearCollections() {
for (var collection in mongoose.connection.collections) {
mongoose.connection.collections[collection].remove(function() {});
@gmazzap
gmazzap / Controller.php
Last active April 22, 2024 12:08
WordPress plugin to ease the creation of virtual pages.
<?php
namespace GM\VirtualPages;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
*/
class Controller implements ControllerInterface {
private $pages;
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing