- There are three types of permissions in files and folders in unix
- Read (r)
- Write (w)
- Execute (x)
- And, there is a classification of users called UGO (explained bellow):
- U ~> User (usually, you)
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
DemoHandler | |
--- | |
def lambda_handler(event, context): | |
print(event) | |
return "hello, world!!" | |
DemoAuthorizer | |
--- |
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
package com.fewlaps.android.permissiongranter; | |
import android.app.Activity; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.support.test.uiautomator.UiDevice; | |
import android.support.test.uiautomator.UiObject; | |
import android.support.test.uiautomator.UiObjectNotFoundException; | |
import android.support.test.uiautomator.UiSelector; | |
import android.support.v4.content.ContextCompat; |
- Use
curl
to get the JSON response for the latest release - Use
grep
to find the line containing file URL - Use
cut
andtr
to extract the URL - Use
wget
to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
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
package nz.org.winters.android.widgetscommon.tests; | |
import android.support.test.espresso.DataInteraction; | |
import android.support.test.espresso.matcher.BoundedMatcher; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; | |
import nz.org.winters.android.widgetscommon.settings.FABPreferenceFragment; | |
import nz.org.winters.android.widgetscommon.settings.SettingGroupListFragment; |
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
class Node: | |
def __init__(self, val): | |
self.val = val | |
self.leftChild = None | |
self.rightChild = None | |
def get(self): | |
return self.val | |
def set(self, val): |
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 CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |