Skip to content

Instantly share code, notes, and snippets.

View darkclaw's full-sized avatar
😄
Working

1van Lopez darkclaw

😄
Working
View GitHub Profile

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@darkclaw
darkclaw / astar.py
Created April 4, 2019 17:38 — forked from jamiees2/astar.py
A* Algorithm implementation in python.
# Enter your code here. Read input from STDIN. Print output to STDOUT
class Node:
def __init__(self,value,point):
self.value = value
self.point = point
self.parent = None
self.H = 0
self.G = 0
def move_cost(self,other):
return 0 if self.value == '.' else 1
@darkclaw
darkclaw / native_app_launcher.js
Created August 23, 2017 21:34 — forked from prabeengiri/native_app_launcher.js
Native App Launcher (Works in ios9)
// NativeAppLauncher.
// Copied from bartt.me/openapp
var NativeAppLauncher = (function () {
var IOS_VERSION_RE = /OS\s+(\d)_/;
var timers = [];
var userAgent = window.navigator.userAgent;
var isAndroid = function () {
return /Android/.test(userAgent);
};
var isIOS = function () {