Skip to content

Instantly share code, notes, and snippets.

@SuppieRK
SuppieRK / CaseMatcher.kt
Last active June 25, 2024 23:01
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}
@ToniRV
ToniRV / mp4-to-gif.bash
Last active January 18, 2022 04:57
Convert MP4 to high-quality GIF
#!/usr/bin/env python
import sys
import os
import shutil
import subprocess
import argparse
# Group of Different functions for different styles
if sys.platform.lower() == "win32":
@aiiddqd
aiiddqd / sqlgz.sh
Created October 24, 2018 08:15
Extract Sql.Gz File On Command Line (macos, linux)
gzip -d backup-20100910164109.sql.gz
@csarron
csarron / scrcpy_shortcut.md
Created April 20, 2018 02:08
Scrcpy Shortcuts

Scrcpy Shortcuts

Action Shortcut
switch fullscreen mode Ctrl+f
resize window to 1:1 (pixel-perfect) Ctrl+g
resize window to remove black borders Ctrl+x | Double-click¹
click on HOME Ctrl+h | Middle-click
click on BACK Ctrl+b | Right-click²
click on APP_SWITCH Ctrl+m
@gsluthra
gsluthra / setup-bahmni-firewall.sh
Last active August 25, 2021 09:30
Firewall settings for Bahmni (Allow only SSH, and Browser access to http, https and openerp. Block everything else). If you are using to setup on Digtial Ocean / CentOS v7.6, then scroll to bottom for comments.
# Refer to this link to understand below rules: https://wiki.centos.org/HowTos/Network/IPTables
# Set default input policy to ACCEPT
iptables -P INPUT ACCEPT
# Flush all current rules!
iptables -F
# Allow localhost interface
iptables -A INPUT -i lo -j ACCEPT
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs