This file contains hidden or 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
import UIKit | |
extension UIView { | |
// In order to create computed properties for extensions, we need a key to | |
// store and access the stored property | |
fileprivate struct AssociatedObjectKeys { | |
static var tapGestureRecognizer = "MediaViewerAssociatedObjectKey_mediaViewer" | |
} | |
This file contains hidden or 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
Install using ```pecl install xdebug``` | |
and got error something like this: | |
Warning: mkdir(): File exists in System.php on line 294 | |
PHP Warning: mkdir(): File exists in /opt/homebrew/Cellar/php/8.2.12_1/share/php/pear/System.php on line 294 | |
Warning: mkdir(): File exists in /opt/homebrew/Cellar/php/8.2.12_1/share/php/pear/System.php on line 294 | |
ERROR: failed to mkdir /opt/homebrew/Cellar/php/8.2.12_1/pecl/20220829 | |
simply fix with this: |
This file contains hidden or 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
# Install gpg tools | |
https://gpgtools.org | |
# Install gpg | |
brew install gpg | |
# Generating and exporting | |
gpg --gen-key | |
gpg --armor --export <email> > ~/.backups/gpg_git_public.key | |
gpg --armor --export-secret-key <email> > ~/.backups/gpg_git_private.key |
This file contains hidden or 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
showModalBottomSheet( | |
context: context, | |
isScrollControlled: true, | |
builder: (context) => SingleChildScrollView( | |
child: Container( | |
color: Color(0xff757575), | |
padding: EdgeInsets.only( | |
bottom: MediaQuery.of(context).viewInsets.bottom), | |
child: Container( | |
padding: EdgeInsets.all(20.0), |
This file contains hidden or 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
private fun setDinamicAdsMarginFullscreenMode() { | |
val bottomMargin = getNavigationBarHeight(this, resources.configuration.orientation) | |
if (adView?.layoutParams is MarginLayoutParams) { | |
(adView?.layoutParams as MarginLayoutParams).setMargins( | |
0, | |
top, | |
0, | |
bottomMargin | |
) | |
adView?.requestLayout() |
This file contains hidden or 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
import android.graphics.Rect | |
import androidx.recyclerview.widget.RecyclerView | |
import android.view.View | |
/** | |
* this widget add margin to start | |
* @param outReact.left to change margin start | |
* | |
* */ | |
class RecyclerMargin( |
This file contains hidden or 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
DateTime.ToString() Patterns | |
All the patterns: | |
0 MM/dd/yyyy 08/22/2006 | |
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006 | |
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30 | |
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM | |
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30 | |
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<!-- Drop Shadow Stack --> | |
<item> | |
<shape> | |
<padding | |
android:bottom="1dp" | |
android:left="1dp" | |
android:right="1dp" |
This file contains hidden or 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
image: node:latest | |
cache: | |
paths: | |
- node_modules/ | |
- app/bower_components | |
deploy_production: | |
stage: deploy | |
environment: Production |
This file contains hidden or 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
import android.graphics.Rect; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
public class EqualSpacingItemDecoration extends RecyclerView.ItemDecoration { | |
private final int spacing; | |
private int displayMode; | |
public static final int HORIZONTAL = 0; |