Skip to content

Instantly share code, notes, and snippets.

View tranc99's full-sized avatar

Tendai Mutunhire tranc99

View GitHub Profile
@tranc99
tranc99 / DockerCleanupScripts.md
Created January 16, 2021 20:47 — forked from johnpapa/DockerCleanupScripts.md
Docker Cleanup Scripts

Docker - How to cleanup (unused) resources

Cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@tranc99
tranc99 / keybase.md
Created January 8, 2021 21:20
keybase.md

Keybase proof

I hereby claim:

  • I am tranc99 on github.
  • I am tenmutunhire (https://keybase.io/tenmutunhire) on keybase.
  • I have a public key ASAqawHibTdB43nedSbrlE1d11w_076xYhqZxI2EewaMawo

To claim this, I am signing this object:

@tranc99
tranc99 / gist:31965eaecdc9e02c5b4ea3b9a6dea559
Created December 18, 2020 20:48
installing-clojurescript
# Installing ClojureScript
@tranc99
tranc99 / notifications.js
Created June 26, 2018 15:35
Notifications
```JAVASCRIPT
// notifications.js
var EventEmitter, Notifier, compareLocations, fs, getNewLocation, http, internationalSpaceStation, locationBuffer, notifyUser, pushupdates, updateBuffer;
EventEmitter = require("events").EventEmitter;
http = require("http");
fs = require("fs");
```JAVASCRIPT
// music_library.js
var Album, legend, mongoose;
mongoose = require("mongoose");
mongoose.connect("mongodb://localhost/music_library");
Album = mongoose.model("Album", {
title: String,
@tranc99
tranc99 / click.js
Created June 26, 2018 15:29
click code
```JAVASCRIPT
// click.js
$(document).ready(function() {
return $("#auth-btn").click(function() {
var signin;
signin = $("#form-template").html();
return $("#learn-lib").append(signin);
});
});
@tranc99
tranc99 / callbacks.html
Created June 26, 2018 15:02
HTML Code for Event Emitters Tutorial
```HTML
<!-- callbacks.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Corporate Learning Center</title>
@tranc99
tranc99 / Git checkout remote branch
Created June 18, 2016 12:35 — forked from markSci5/Git checkout remote branch
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
@tranc99
tranc99 / homebrew_mysql_pass_reset.txt
Last active August 29, 2015 14:27 — forked from fallwith/homebrew_mysql_pass_reset.txt
Reset MySQL root password (Homebrew)
$> launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
$> /usr/local/Cellar/mysql/5.5.9/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.5.9 --datadir=/usr/local/Cellar/mysql/5.5.9/data --plugin-dir=/usr/local/Cellar/mysql/5.5.9/lib/plugin --log-error=/usr/local/Cellar/mysql/5.5.9/data/errors.err --pid-file=/usr/local/Cellar/mysql/5.5.9/data/pidfile.pid --skip-grant-tables
$> mysql
mysql> UPDATE mysql.user SET Password=PASSWORD('root_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
$> kill `cat /usr/local/Cellar/mysql/5.5.9/data/pidfile.pid`
@tranc99
tranc99 / Makefile
Last active August 29, 2015 14:18 — forked from toolmantim/Makefile
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch