Skip to content

Instantly share code, notes, and snippets.

@andrewfree
andrewfree / _verify-repair-permissions-disk.md
Created January 24, 2018 10:11 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@andrewfree
andrewfree / mcreate
Created April 16, 2014 23:28
MomentCreate
def create
# current_user = User.first
if moment_params.empty?
render status: 406, nothing: true and return
else
@moment = Moment.new(moment_params)
@moment.user_id = current_user.id
if @moment.save
render "moments/show", status: 201 and return
else

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
✘ rever@rever1.1.1.1  ~/Desktop  sudo rvm install ruby Local 9:47PM ▸▸▸▸▸▸▸▸▸▸
Password:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-2.0.0-p353.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.
Installing required packages: openssl..........
Error running 'requirements_osx_brew_libs_install openssl',
public class Book{
private int numPages=0;
private float price=0.0f;
private String author="";
private String title="";
private boolean checkedOut=false;
public Book(int a,float b,String c,String d){
numPages=a;
price=b;
author=c;
/* */ import java.awt.BorderLayout;
/* */ import java.awt.Font;
/* */ import java.awt.GridLayout;
/* */ import javax.swing.JApplet;
/* */ import javax.swing.JButton;
/* */ import javax.swing.JLabel;
/* */ import javax.swing.JPanel;
/* */
/* */ public class Lab8A extends Panel
/* */ {
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class MainClass extends JPanel {
public MainClass() {
JLabel lblMarried = new JLabel("Are you married?", JLabel.LEFT);
JLabel lblGolf = new JLabel("Do you play golf?", JLabel.RIGHT);