Skip to content

Instantly share code, notes, and snippets.

View leinardi's full-sized avatar

Roberto Leinardi leinardi

  • Munich
View GitHub Profile
@somidad
somidad / workflow.yml
Last active June 23, 2023 14:06
GitHub Workflow to check any change on git repository and do something if any
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
- name: Check if there is any change
id: get_changes
# deprecated. see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
#run: echo "::set-output name=changed::$(git status --porcelain | wc -l)"
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
- name: Do something if there is any change
if: steps.get_changes.outputs.changed != 0
run: do something
@winedog
winedog / DD-WRT_Guest_Wifi_Directions.txt
Last active December 5, 2023 19:36
DD-WRT Guest Wifi Configuration
The directions from Kong's configuration for Guest Networks posted at http://tips.desipro.de/2013/12/06/guest-wifi-setup-dd-wrt/ have been lost due to Kong shuttering his support. This is to preserve and make available that information.
Guest Wifi Setup DD-WRT
Here comes a short guide on how to setup a Virtual Guest AP. In build 23020 I added an option to isolate guest wifis from local network. This along with my fix for unbridged vifs allows to setup a guest wifi with only a few clicks. The following image shows the Wireless->Basic Setup page. In order to create a virtual access point, for your guests, click on Add in Virtual Interfaces section. Now fill out the details for this guest wifi. The labels in red give you a short explanation what these settings are for.
GuestWireless
Once you are done go to Wireless->Wireless Security, choose your encryption scheme and password for this guest wifi. Next step is to enable DHCPD for the guest wifi. Go to Setup->Networking and add another dhcp server for the gu
@fredericrous
fredericrous / pipeline.gdsl
Last active September 11, 2019 09:39 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@ggarcia24
ggarcia24 / pipeline.gdsl
Last active March 1, 2024 13:54
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@natanfelles
natanfelles / theme_darcula.xml
Created June 13, 2016 14:48
gedit darcula theme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="darcula" _name="Darcula" version="1.0">
<author>Sash0k</author>
<_description>Dark color scheme using IntelliJ IDEA colors</_description>
<!-- Scribe Theme Generator 1.3 -->
<!-- COLORS -->
<color name="comment_color" value="#629755"/>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- RED -->
<color name="red_50">#FFEBEE</color>
<color name="red_100">#FFCDD2</color>
<color name="red_200">#EF9A9A</color>
<color name="red_300">#E57373</color>
<color name="red_400">#EF5350</color>
<color name="red_500">#F44336</color>
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active December 16, 2023 08:55
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* 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
@Shywim
Shywim / CursorRecyclerAdapter.java
Last active February 27, 2024 13:42
A custom Adapter for the new RecyclerView, behaving like the CursorAdapter class from previous ListView and alike. Now with Filters and updated doc.
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@daniellevass
daniellevass / android_material_design_colours.xml
Last active March 26, 2024 15:48
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>