Skip to content

Instantly share code, notes, and snippets.

View withoutwax's full-sized avatar
🍩
👀

Will withoutwax

🍩
👀
View GitHub Profile
@50percentgrey
50percentgrey / apple.sh
Created January 29, 2020 19:11
Delete-Clean Unnecessary files / Apple / Xcode
#!/bin/bash
# Delete Archived Applications
rm -r ~/Library/Developer/Xcode/Archives/*/
# Delete Devired Data
rm -r ~/Library/Developer/Xcode/DerivedData/*/
# Delete Apple cached files
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/
@withoutwax
withoutwax / smooth-animation.css
Created July 1, 2019 06:58
Smooth Animation CSS
div {
-webkit-transition: all 2s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
div::after {
-webkit-transition: all 2s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
div:hover {
color: inherit;
@withoutwax
withoutwax / custom_fields_devise.markdown
Last active April 27, 2024 00:43
Adding Custom Fields to Devise

Adding Custom Fields to Devise

Before doing anything, please check the versions of the gem files:

gem 'rails', '~> 5.1.4'
gem 'devise', '~> 4.4.0'

Disclaimer - This solution may not work with older versions of rails and devise. Versions listed above were the latest versions of gems which I was using at the time of creation and tests. (10 Jan 2018)

@jatinchauhann
jatinchauhann / sample-mongo-commands.json
Created July 4, 2017 09:12
Mondo DB useful commands for beginners. Adapted from a YouTube Video - https://www.youtube.com/watch?v=pWbMrx5rVBE
//after installing mondodb
//cd to the 'bin' directory of the mongodb folder
//run the following commands in the cmd (run as administrator -for Windows)
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --logappend --rest --install
//to start the mongodb service
net start MongoDB
//to enter mongodb service (this is necessary to start the mongo service)
mongo
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@alexpchin
alexpchin / Add_Existing_Project_To_Git.md
Created June 1, 2014 20:14
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init
@cferdinandi
cferdinandi / stop-video.js
Last active February 15, 2024 17:03
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@gitaarik
gitaarik / git_submodules.md
Last active May 4, 2024 11:10
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k