Skip to content

Instantly share code, notes, and snippets.

View parhammmm's full-sized avatar
💻
Developing

Parham Saidi parhammmm

💻
Developing
View GitHub Profile
@bponomarenko
bponomarenko / main.js
Last active April 7, 2023 13:47
Custom implementation of the missing onAbort hooks in vue-router
import Vue from 'vue';
import VueRouter from 'vue-router';
import applyOnRouterAbortShim from './on-router-abort-shim';
Vue.use(VueRouter);
const router = new VueRouter(...);
applyOnRouterAbortShim(router);
@johanvergeer
johanvergeer / create_and_restore_backup.md
Last active October 9, 2020 18:22
Create and replace database backup in Docker

Create and restore a database backing using Docker

This script is intended to demonstrate how a backup can be created and restored using Docker containers. The image we'll use is SQL Server 2017

The scripts are baed on the official Microsoft documentation

Create a new container and volume

Create a new container from the mssql-server-linux image

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active June 25, 2024 07:29
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@niallobrien
niallobrien / App.js
Last active May 14, 2020 21:05
Simple Vue & Vuex fetch example using @feathersjs for realtime data.
// App.js
<template>
<div id="app">
<Messages></Messages>
</div>
</template>
<script>
import Messages from './components/Messages'
import store from './vuex/store'
@RobertoSchneiders
RobertoSchneiders / deploy_with_ebcli3_on_circleci.md
Last active December 4, 2023 09:07
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.

If you are using the Circle CI 2.0, take a look at this article from ryansimms

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.
@karpathy
karpathy / min-char-rnn.py
Last active July 29, 2024 00:13
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)
@carymrobbins
carymrobbins / setup-postgresql-vagrant.md
Last active May 4, 2023 10:22
Configure PostgreSQL in a Vagrant guest to allow connections from the host.

Configure Postgres

  • Update pg_hba.conf (most likely in /etc/postgresql/9.4/main) with -
    • host all all 0.0.0.0/0 trust
  • Update postgresql.conf to use listen_addresses = '*'
  • Be sure to sudo service postgresql restart

Configure Vagrant

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule