Skip to content

Instantly share code, notes, and snippets.

View JuanjoSalvador's full-sized avatar
🎯
Focusing

Juanjo Salvador JuanjoSalvador

🎯
Focusing
View GitHub Profile
@JuanjoSalvador
JuanjoSalvador / mysqli-example.php
Created April 20, 2018 13:46
Example of MySQLi connection
<html>
<head>
<title>MySQLi example</title>
<meta charset="utf8">
</head>
<body>
<?php
// Usaremos una base de datos (foobar) con una tabla (users) que contiene username y email.
import java.io.*;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Agenda {
public static void AfegirContacte(File agenda, String contacte, String telefon){
try {
// abre un nuevo flujo de escritura en el archivo indicado
@JuanjoSalvador
JuanjoSalvador / nothing.js
Created May 31, 2018 14:57
JavaScript's Nothing Library
/**
* Nothing.js
* Author: Juanjo Salvador
* Version: 1.0.0
*/
@JuanjoSalvador
JuanjoSalvador / hashtaget.py
Created August 25, 2018 17:04
Modification of Instaget package to download pictures from a hashtag
import sys
import json
import requests
from urllib import request
from bs4 import BeautifulSoup
def main():
try:
url = sys.argv[1]
@JuanjoSalvador
JuanjoSalvador / wine-installer.sh
Last active January 30, 2022 21:25
Script to install Wine Staging from WineHQ repositories (Debian)
#!/bin/bash
VERSIONS="buster|bullseye|bookworm"
BRANCHES="stable|devel|staging"
if [ "${UID}" -eq 0 ] ; then
ARCH=$(dpkg --print-architecture)
if [ "${ARCH}" == "amd64" ] ; then

Keybase proof

I hereby claim:

  • I am JuanjoSalvador on github.
  • I am jsalvador (https://keybase.io/jsalvador) on keybase.
  • I have a public key whose fingerprint is 8650 335F 9B32 25FC 2E18 5395 71EC 2F5C B6EB CF5A

To claim this, I am signing this object:

@JuanjoSalvador
JuanjoSalvador / iron.zsh-theme
Created October 8, 2019 19:59
My current zsh theme
#%{$fg_bold[green]%}%n@%m %{$reset_color%}
PROMPT=$'%{$fg[blue]%}[%~]%{$reset_color%} $(git_prompt_info) %{$fg_bold[red]%}→%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@JuanjoSalvador
JuanjoSalvador / README.md
Last active October 9, 2019 19:39
Place it on ~/.config/nvim/init.vim

Requirements

Install

  • Copy init.vim into your vim/neovim config (~/.vimrc or ~/.config/nvim/init.vim).
  • Run :PlugInstall command.
  • Reload.
@JuanjoSalvador
JuanjoSalvador / settings.ini
Created October 13, 2019 01:02
Telegram's channel admin bot
[DEFAULT]
API_KEY = SET YOUR BOT API KEY HERE
CHANNEL_NAME = SET YOUR @channelname HERE