Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / laravel_xampp_setup.md
Created April 22, 2022 01:16
Laravel Xampp setup on Mac and Windows

Laravel Xampp Setup (Windows & Mac)

Install Xampp

Install Xampp from https://www.apachefriends.org/index.html

  • Run the Xampp installer and open the Xampp control panel
  • Make sure that you enable the Apache and MySQL services
  • On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder

Install Composer

@radi-cho
radi-cho / proguard-user.txt
Created February 5, 2019 09:30
Proguard config for solving the common Admob Unity error ClassNotFoundException ads.UnityAdListener
-keep class com.google.unity.** {
*;
}
-keep public class com.google.android.gms.ads.**{
public *;
}
-keep public class com.google.ads.**{
public *;
}
-keepattributes *Annotation*
@manwithsteelnerves
manwithsteelnerves / KeyboardHelper.java
Created December 9, 2017 05:38
Webview Adjust Pan in Fullscreen Activity
package com.voxelbusters.nativeplugins.helpers;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import com.voxelbusters.nativeplugins.helpers.interfaces.IKeyboardListener;
@brunogaspar
brunogaspar / macro.md
Last active May 1, 2024 07:24
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@kibotu
kibotu / viewutils.java
Created May 29, 2016 13:25
Change Status Bar color during runtime on android
public static void changeStatusBarColor(final int color) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
return;
final Window window = getActivity().getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(color);
}
@jirisolc
jirisolc / https_fopen_without_cert_check.php
Last active October 14, 2023 18:44
PHP fopen() to https:// without cert check
<?php
$context = stream_context_create(
array (
'ssl' = > array (
'verify_peer' => false,
'verify_peer_name' => false
)
)
);
@jcguarinpenaranda
jcguarinpenaranda / PinchZoom.cs
Created August 8, 2015 23:29
Pinch to zoom camera in Unity 3d
using UnityEngine;
public class PinchZoom : MonoBehaviour
{
public float perspectiveZoomSpeed = 0.5f; // The rate of change of the field of view in perspective mode.
public float orthoZoomSpeed = 0.5f; // The rate of change of the orthographic size in orthographic mode.
void Update()
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
/// <summary>
/// A simple free camera to be added to a Unity game object.
///
/// Keys: