Skip to content

Instantly share code, notes, and snippets.

@sergiocasero
sergiocasero / DaoGenerator.kt
Created April 25, 2019 09:39
DaoGenerator code template for IntelliJ/AS
package ${PACKAGE_NAME}
#parse("File Header.java")
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Update
import androidx.room.Query
@Dao
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
#!/bin/bash
# Error handling
function OwnError()
{
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)"
exit $2
}
# Repository for rethinkdb
@jamesjara
jamesjara / webviewclient.java
Created March 30, 2015 05:54
Android inject js or css to external page webview
//---- Appened STYLE
//document.getElementsByTagName('html')[0].innerHTML+='<style>*{color:#fff}</style>'
StringBuilder extraStyles = new StringBuilder();
extraStyles.append("javascript:(function extra(){");
if(getResources().getBoolean(R.bool.extraCss)){
extraStyles.append(
"var aa =document.createElement(\"link\");" +
"aa.type='text/css'; aa.rel='stylesheet'; "+
"aa.href='"+getResources().getString(R.string.extraCssUrl)+"';"+
"document.getElementsByTagName(\"head\")[0].appendChild(aa);"
@daniellevass
daniellevass / android_material_design_colours.xml
Last active May 22, 2024 10:43
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>