This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DISTRIBUTION_ID= | |
#Invalidate the CloudFront Distribution | |
invalidation_id=$(aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*" --query Invalidation.Id) | |
length=${#invalidation_id} | |
# Wait for invalidation to finish | |
aws cloudfront wait invalidation-completed --distribution-id $DISTRIBUTION_ID --id ${invalidation_id:1:$length-2} |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
- ownload mojave installer -> app store
- formatting usb:
diskutil partitionDisk /dev/disk1 2 MBR FAT32 "CLOVER EFI" 200Mi HFS+J "install_osx" R
install https://bitbucket.org/RehabMan/clover/downloads/Clover_v2.4k_r4701.RM-4963.ca6cca7c.zip to CLOVER Partition
For Clover UEFI, run the Clover Installer package:
- if using MBR, select the target of the install to "CLOVER EFI" using "Change Install Location"
- select "Customize" (the default is a legacy install -- we need to change it)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Circle Internet Financial | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GridActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.grid); | |
final GridViewPager mGridPager = (GridViewPager) findViewById(R.id.pager); | |
mGridPager.setAdapter(new SampleGridPagerAdapter(this, getFragmentManager())); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |