Skip to content

Instantly share code, notes, and snippets.

View gieart87's full-sized avatar

Sugiarto gieart87

View GitHub Profile
@premitheme
premitheme / README.md
Last active March 23, 2024 22:08
Recover MAMP MySQL database using .frm and .ibd files after InnoDB crash

Recover MAMP MySQL database using .frm and .ibd files after InnoDB crash

After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.

Preparation

You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56 (or mysql57 depending on MySQL version).

You will find folders containing the database name, inside them you will find .frm and .ibd files. Take a copy of the entire folder for backup in another place, the desktop for example.

@hgrimelid
hgrimelid / php-dyld.md
Created August 17, 2018 07:36
php: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib

After upgrading to Node v.10.9.0 via Homebrew the following error message was thrown from PHP:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

Reinstall PHP to fix, for me that's:

@cihad
cihad / Capfile
Last active August 8, 2019 14:43
Ubuntu 16.04.4 x64, Ruby 2.5.1, Rails 5.2.0, Postgresql, Capistrano 3, Puma. Sidekiq, Nginx
require_relative 'config/application'
require 'capistrano/setup'
require "capistrano/scm/git"
require 'capistrano/deploy'
require 'capistrano/nginx'
require 'capistrano/puma'
require 'capistrano/puma/nginx'
require "capistrano/chruby"
require 'capistrano/rails'
require 'capistrano/rails/db'
#!/usr/bin/env python
from re import findall,sub
from lxml import html
from time import sleep
from selenium import webdriver
from pprint import pprint
from xvfbwrapper import Xvfb
def parse(url):
searchKey = "Las Vegas" # Change this to your city
@PavloBezpalov
PavloBezpalov / 1 Gist conventions
Last active January 7, 2024 11:55
Deploy Rails 5.0.0.beta3 to VPS(Ubuntu 14.04.4 LTS). Nginx, Puma, Capistrano3, PostgreSQL, RVM.
<<APP>> change this variables
@javierarques
javierarques / protractorAPICheatsheet.md
Last active January 31, 2023 08:51
Protractor API Cheatsheet
@BeattieM
BeattieM / access_token_generation.rb
Last active May 26, 2016 10:11
Rails Doorkeeper AuthToken Manual Creation
@access_token = Doorkeeper::AccessToken.create(
application_id: application.id,
resource_owner_id: current_resource_owner.id,
use_refresh_token: Doorkeeper.configuration.refresh_token_enabled?,
expires_in: Doorkeeper.configuration.access_token_expires_in
)
@ghilead
ghilead / create_es_combined_index.rake
Last active January 18, 2019 12:08
Rake task for collocating multiple models as types in a single index.
# A Rake tasks to facilitate importing data from your models into a common Elasticsearch index.
#
# All models should declare a common index_name, and a document_type:
#
# class Article
# include Elasticsearch::Model
#
# index_name 'app_scoped_index'
# document_type 'articles'
#
@agendor
agendor / hapijs-rest-api-tutorial.md
Last active August 31, 2021 08:31
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@aodin
aodin / gist:9493190
Last active March 23, 2024 20:24
Parsing JSON in a request body with Go
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
type Message struct {