Skip to content

Instantly share code, notes, and snippets.

View aaguilera's full-sized avatar

Angel Aguilera aaguilera

View GitHub Profile
@nonamed01
nonamed01 / fuckForticlient.sh
Last active April 27, 2024 00:45
fuckForticlient, a command-line client to connect to SAML fortivpn servers by using openfortivpn and the --cookie-in-stdin parameter
#!/bin/bash
# Uncomment the following line to debug the script:
#set -x
#####################################################################################
# fuckForticlient.sh
#
# Script to authenticate against Fortinet SAML servers using Firefox and
# openfortivpn. This replaces Forticlient for GNU/Linux completely.
# Because openfortivpn does not support SAML login (yet), this script uses Firefox
# to authenticate, grabs SVPNCOOKIE and then calls openfortivpn to setup
@ivanramosnet
ivanramosnet / valnif.php
Last active February 27, 2024 14:27
Checks for any valid European Union value added tax number. (http://sima.cat/nif.php)
<?php
#
# Checks for any valid European Union value added tax number
# from original Cobol public version
# http://a104.g.akamai.net/7/104/3242/v001/www.aeat.es/padres/prevalid/descarga/prv34902.exe
# to PHP by David Gimeno i Ayuso, info@sima.cat. Catalonia 2002.
#
# input $vat vat number (upper or lowercase, separators included)
# $country valid ISO country code of any EU-15
# note: GR is the ISO country code for Greece but EU
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 2, 2024 11:53
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@pansapiens
pansapiens / views.py
Created February 20, 2018 01:26
Django REST Framework CSV parser, RFC 4180
from typing import Dict, List
import csv
from rest_framework import status
from rest_framework.response import Response
from rest_framework.parsers import JSONParser, BaseParser
from rest_framework.views import APIView
class CSVTextParser(BaseParser):
"""
A CSV parser for DRF APIViews.
@filipelenfers
filipelenfers / installJdkTarGzUbuntu.sh
Last active April 22, 2024 02:02
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
@jhanschoo
jhanschoo / localc2csv.sh
Last active February 1, 2022 22:24
Uses LibreOffice to convert a file to csv format, preserving Unicode characters in UTF-8
#!/usr/bin/env sh
# localc2csv.sh [--outdir OUTPIT_DIR] FILE [FILE...]
# Uses LibreOffice to convert a file to csv format, preserving
# Unicode characters in UTF-8
# Assumes LibreOffice is installed to /Applications in MacOS.
# for documentation on the arguments, c.f.
# https://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/
# https://help.libreoffice.org/Common/Starting_the_Software_With_Parameters
# https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
@tdd
tdd / angular-just-say-no.md
Last active November 18, 2022 20:47
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@JacobASeverson
JacobASeverson / WebSecurityConfig
Last active August 25, 2017 07:04
Example java config for using CAS with Spring Security
@Configuration
@EnableWebMvcSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public ServiceProperties serviceProperties() {
ServiceProperties serviceProperties = new ServiceProperties();
serviceProperties.setService("https://localhost:8443/cas-sample/j_spring_cas_security_check");
serviceProperties.setSendRenew(false);
return serviceProperties;