Skip to content

Instantly share code, notes, and snippets.

View pthiers's full-sized avatar

Philippe Thiers pthiers

  • RiskAmerica SPA
  • Puerto Octay, Chile
  • 14:55 (UTC -04:00)
View GitHub Profile
compdef _tsh tsh
zstyle ':completion:*' group-name ''
zstyle ':completion:*:*:-command-:*:*' group-order alias builtins commands hosts functions
global_args=('-l[Remote host login]' \
'--login[Remote host login]' \
'--proxy[SSH proxy address]' \
'--user[SSH proxy user]' \
'--ttl[Minutes to live for a SSH session]' \
'-i[Identity file]' \
@themakunga
themakunga / README.md
Last active December 7, 2021 22:26
Validador de RUN chileno en TypeScript

Validador de RUN chile en Typescript

conmo usarlo

solo rut

import { validateRUN } from 'your/dir/file.ts';

const run: string = '11.111.111-1'; // also can be '11111111-1' or '111111111'
const response: boolean = validateRUN({run});
@stollcri
stollcri / c41lab
Last active June 16, 2024 11:08
A script which uses ImageMagick to develop scans of C-41 film negatives into color-corrected positive images
#!/bin/bash
# ====================================================================================================================
#
# Converted for bash by @stollcri (stollcri at gmail dot com), 2020-07-28
#
# Originally downloaded from: https://sites.google.com/site/c41digitallab/the-complexity
#
# ====================================================================================================================
# C41LAB - Version 1.2
#
@trongthanh
trongthanh / mojave.xml
Last active July 10, 2024 13:25
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
@zparnold
zparnold / one_liner.sh
Last active June 25, 2024 07:12
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@moscas
moscas / CSV-ToOneRow-Groovy.csv.groovy
Last active April 5, 2022 10:43
DataGrip extractors
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@kamerk22
kamerk22 / lumen.conf
Last active August 21, 2018 17:49
Laravel or Lumen application inside sub directory nginx configuration with routing.
server {
listen 80;
server_name dev ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
location ~ \.php$ {
@developit
developit / unistore.js
Last active September 8, 2020 15:13
Update: the newer & better version of this is published: https://github.com/developit/unistore
import { h, Component } from 'preact';
/** Creates a new store, which is a tiny evented state container.
* @example
* let store = createStore();
* store.subscribe( state => console.log(state) );
* store.setState({ a: 'b' }); // logs { a: 'b' }
* store.setState({ c: 'd' }); // logs { c: 'd' }
*/
@sophiaphillipa
sophiaphillipa / Dockerfile
Last active May 15, 2022 06:39
Configuring PHPStorm to work with xDebug and Docker, by listening.
FROM php:7-fpm
RUN apt-get update && \
apt-get install -y \
zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev
@theleon
theleon / flussonic-webrtc-publish.html
Created November 28, 2016 08:04
Flussonic WebRTC Publishing
<!doctype html>
<html>
<head>
<!-- https://github.com/webrtc/adapter is used for cross-browser interop -->
<script type="text/javascript" src="https://unpkg.com/webrtc-adapter@2.0.8/out/adapter.js"></script>
</head>
<body>
<video id="container" controls autoplay></video>
<script>
window.onload = function() {