Skip to content

Instantly share code, notes, and snippets.

View elminson's full-sized avatar

Elminson De Oleo Baez elminson

View GitHub Profile
<?php
enum Grade: string
{
case PASS = 'pass';
case FAIL = 'fail';
case A = 'A';
case F = 'F';
case INVALID = 'Invalid grade!\n';
<?php
enum Grade: string
{
case PASS = 'pass';
case FAIL = 'fail';
case A = 'A';
case F = 'F';
case INVALID = 'Invalid grade!\n';
@maxep
maxep / MyImageButton.java
Last active May 5, 2024 12:14
[Android] Add gray filter when disabling an ImageButton
import android.content.Context;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageButton;
public class MyImageButton extends ImageButton{
public MyImageButton(Context context) {
@jfloff
jfloff / mamp.md
Last active August 20, 2024 12:46
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you: