Skip to content

Instantly share code, notes, and snippets.

View Ekt0s's full-sized avatar
🌴

Louis-Gabriel ZAITI Ekt0s

🌴
View GitHub Profile
@Ekt0s
Ekt0s / TestPreview.kt
Created April 28, 2022 23:14
Quick sample to use PreviewParameterProvider
@Composable
fun MyCard(dumbo: Dummy) {
Box(
Modifier
.fillMaxWidth()
.height(64.dp)
.background(colorResource(id = R.color.colorPrimary))
) {
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Ekt0s
Ekt0s / Readme.md
Last active March 25, 2016 19:15 — forked from windowfinn/Readme.md
Dashing Jenkins Widget - a fork that adds html5 audio alerts

Description

Dashing widget to display a Jenkins build status and build progress

This extension adds html5 audio alerts to the generated html dashboard. An alert will be played for each instance of the widget, but only if the state has changed. One sound for success, and one for failure.

This widget is a fork of Marco's work

The widget is based on the meter-widget which is default in the Dashing installation

@Ekt0s
Ekt0s / apply-gitlab-remote.gradle
Created November 27, 2015 15:33
This shows how to use a remote gradle script stored on Gitlab
apply from: "http://gitlab.domain.com/GITLAB_GROUP/YOUR_PROJECT/raw/YOUR_BRANCH/YOUR_FILE_PATH?private_token=${GITLAB_PV_TOKEN}"
e.g: apply from: "http://gitlab.domain.com/android/henry_pottier/raw/develop/build.nexus.gradle?private_token=${GITLAB_PV_TOKEN}"
// The GITLAB_PV_TOKEN property MUST BE set on your global gradle property file
@Ekt0s
Ekt0s / install_nodejs.sh
Created August 21, 2015 17:42
Install nodejs from source on Ubuntu
# Make sure that you have those programs on your ubuntu
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# Clone the repos from https://github.com/joyent/node
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
@Ekt0s
Ekt0s / Material color XML
Created February 16, 2015 16:59
Android Material colors palette in xml ressources for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette
<!-- RED -->
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
<color name="red_600">#dd191d</color>
<color name="red_700">#d01716</color>
<color name="red_800">#c41411</color>
@Ekt0s
Ekt0s / gist:e2acf440f400179422ba
Created August 4, 2014 09:39
Android Unique ID
public String getDeviceSecureId() {
return Settings.Secure.getString(this.getContentResolver(), Settings.Secure.ANDROID_ID);
}
@Ekt0s
Ekt0s / gist:7e2d99432732d5a25df1
Created August 4, 2014 09:37
Regex javadoc comment
"\/\*\*[.\w\s\*\@\-\+\.\,\\\$\#\!\%\^\&\(\)\;\:\'\"\|\/\<\>]+\/"
@Ekt0s
Ekt0s / layouts.xml
Created July 7, 2014 09:17
Little tricks to handle rotation on tablets and handset
<!-- Folder values/layouts.xml -->
<!-- BEGIN_INCLUDE(all) -->
<resources>
<item name="main_layout" type="layout">@layout/onepane_with_bar</item>
<bool name="has_two_panes">false</bool>
</resources>
<!-- END_INCLUDE(all) -->
<!-- Folder: values-sw600dp-land/layouts.xml -->
keytool -genkey -v -keystore limited.keystore -alias limited -keyalg RSA -keysize 2048 -validity 10