Skip to content

Instantly share code, notes, and snippets.

@mwolfson
mwolfson / Color.kt
Last active March 27, 2024 07:28
Material Design Color Resources for Jetpack Compose
import androidx.compose.ui.graphics.Color
// Material Color Resources
val amber_050 = Color(0xFFfff8e1) // Use with black text
val amber_100 = Color(0xFFffecb3) // Use with black text
val amber_200 = Color(0xFFffe082) // Use with black text
val amber_300 = Color(0xFFffd54f) // Use with black text
val amber_400 = Color(0xFFffca28) // Use with black text
val amber_500 = Color(0xFFffc107) // Use with black text
@isimmons
isimmons / gist:8202227
Last active March 15, 2024 10:47
Truncate tables with foreign key constraints in a Laravel seed file.

For the scenario, imagine posts has a foreign key user_id referencing users.id

public function up()
{
	Schema::create('posts', function(Blueprint $table) {
		$table->increments('id');
		$table->string('title');
		$table->text('body');