Skip to content

Instantly share code, notes, and snippets.

View meness's full-sized avatar
:octocat:
I may be slow to respond.

Alex meness

:octocat:
I may be slow to respond.
View GitHub Profile
@philipstanislaus
philipstanislaus / sane-caching.nginx.conf
Last active April 11, 2024 03:35
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@AliMD
AliMD / regular-expression-iranian-mobile.md
Last active March 15, 2024 15:03
Best Regular Expression for Detect Iranian Mobile Phone Numbers

Best Regular Expression for Detect Iranian Mobile Phone Numbers

I'm sure its best regular expression for detect iranian mobile number.

(0|\+98)?([ ]|,|-|[()]){0,2}9[1|2|3|4]([ ]|,|-|[()]){0,2}(?:[0-9]([ ]|,|-|[()]){0,2}){8}


use in javascript

@seanKenkeremath
seanKenkeremath / Android Lollipop Widget Tinting Guide
Last active November 17, 2023 12:40
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@JosiasSena
JosiasSena / DeCryptor.java
Last active September 12, 2023 12:40
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@mabasic
mabasic / helpers.php
Last active October 27, 2022 16:52
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
# Resurrection Remix OS - Marshmallow
Source Code: http://github.com/ResurrectionRemix
G+: https://plus.google.com/communities/109352646351468373340
Resurrection Remix Crowdin : https://crowdin.com/project/resurrectionremix/
For extended changelog, track github activities
# The Changelog
@okmanideep
okmanideep / BetterRecyclerView.java
Last active March 3, 2022 17:18
A RecyclerView that intercepts the scroll only if the user is scrolling in that direction
public class BetterRecyclerView extends RecyclerView{
private static final int INVALID_POINTER = -1;
private int mScrollPointerId = INVALID_POINTER;
private int mInitialTouchX, mInitialTouchY;
private int mTouchSlop;
public BetterRecyclerView(Context context) {
this(context, null);
}
public BetterRecyclerView(Context context, @Nullable AttributeSet attrs) {