Skip to content

Instantly share code, notes, and snippets.

View kaysiz's full-sized avatar
🏠
Working from home

kudakwashe siziva kaysiz

🏠
Working from home
View GitHub Profile
@kaysiz
kaysiz / Dockerfile
Created April 12, 2021 07:39 — forked from DoZator/Dockerfile
Run old Rails 3.2 (Ruby 1.9.3) app for Development with Docker
FROM ruby:1.9.3
MAINTAINER DoZator <oabogatenko@gmail.com>
# Create app directory
RUN mkdir -p /app
WORKDIR /app
COPY Gemfile /app/
@kaysiz
kaysiz / gist:7ae77a2b53ca26815eded078d3f25089
Created August 23, 2020 12:21 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@kaysiz
kaysiz / mysql2-0.3.18
Created June 16, 2020 07:14
msql2-0.3.18 error
Fetching mysql2 0.3.18
Installing mysql2 0.3.18 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/kaysiz/.rvm/gems/ruby-1.9.3-p448@fisheagle/gems/mysql2-0.3.18/ext/mysql2
/home/kaysiz/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -r ./siteconf20200615-123870-1yv7ael.rb extconf.rb
checking for ruby/thread.h... no
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
@kaysiz
kaysiz / .gitlab-ci.yml
Created October 29, 2019 13:36 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@kaysiz
kaysiz / heroku_pg_db_reset.md
Created September 2, 2019 12:19 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku?

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate

@kaysiz
kaysiz / gist:f5cf04f6be86c8f13904808b65229faa
Created April 5, 2019 08:29 — forked from michalmikolajczyk/gist:945460ea2d3bd695cb1c
some codility identical indices test
var A = [];
A[0] = 3;
A[1] = 5;
A[2] = 6;
A[3] = 3;
A[4] = 3;
A[5] = 5;
@kaysiz
kaysiz / Draw.java
Created March 8, 2019 08:47 — forked from oa414/Draw.java
Android Touch Draw
package com.lxy.media;
import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.database.Cursor;
import android.graphics.*;
import android.hardware.Camera;
import android.media.ExifInterface;
@kaysiz
kaysiz / occupation-dropdown.html
Created January 19, 2019 13:38 — forked from ag14spirit/occupation-dropdown.html
Form occupation drop down list
<fieldset>
<legend>Occupation</legend>
<select class="form-control dropdown" id="occupation" name="occupation">
<option value="" selected="selected" disabled="disabled">-- select one --</option>
<optgroup label="Healthcare Practitioners and Technical Occupations:">
<option value="1">- Chiropractor</option>
<option value="2">- Dentist</option>
<option value="3">- Dietitian or Nutritionist</option>
<option value="4">- Optometrist</option>
<option value="5">- Pharmacist</option>
#!/bin/bash
# install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
source ~/.zshrc
# install brew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/mi-ndlovu/WTC-HomeBrew/master/install.sh)"
@kaysiz
kaysiz / sampleREADME.md
Created November 25, 2018 14:20 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here