Skip to content

Instantly share code, notes, and snippets.

View Mithrandir0x's full-sized avatar

Oriol López Sánchez Mithrandir0x

View GitHub Profile
@Mithrandir0x
Mithrandir0x / disable_wifi_hotspot.bat
Last active August 20, 2018 09:30
Two little batch files to create a cozy WiFi hotspot from the laptop Snatched from xda-developers, yet I don't remember the thread. Kudos to the author.
netsh wlan stop hostednetwork
pause
@Mithrandir0x
Mithrandir0x / math_alg.py
Last active December 19, 2015 08:28
Mathematic Algorithms
def fibonacci(n):
"""A Fibonacci generator"""
x_1, x = 1, 1
while ( x < n ):
yield x
x_1, x = x, x + x_1
def erastothenes_sieve(n):
"""Get all the prime numbers below 'n'"""
sqrtN = math.sqrt(n)
@Mithrandir0x
Mithrandir0x / Main.java
Last active December 24, 2015 09:39
clientsocket
package clientsocket;
import java.io.*;
import java.net.Socket;
import java.util.Scanner;
/**
*
* @author manel
*/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mithrandir0x
Mithrandir0x / .bashrc
Created February 15, 2014 11:57
.bashrc file to remove ANSI escape crap when connecting with PLINK to a ssh session with a Vagrant VM connected over Sublime Text REPL
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@Mithrandir0x
Mithrandir0x / vagrantsshkb.sublime-keymap
Created February 15, 2014 12:28
Key-binding to open a SublimeREPL page to an open Vagrant VM
{
"keys": ["ctrl+f7"],
"command": "repl_open",
"args":
{
"type": "subprocess",
"encoding":
{
"windows": "utf-8",
"linux": "utf-8",
CFLAGS=-g -O2 -Wall -Wextra -Isrc -rdynamic -DNDEBUG $(OPTFLAGS)
# These are the usual CFLAGS that you set in all of your projects, but with a few others
# that may be needed to build libraries. You may need to adjust these for different
# platforms. Notice the OPTFLAGS variable at the end which lets people augment the build
# options as needed.
LIBS=-ldl $(OPTLIBS)
# Options used when linking a library, and allows someone else to augment the linking
# options using the OPTLIBS variable.

Examen final de teoría 2012-2013

Definir los conceptos de tautología, fórmula satisfactible y contradicción.

Sea f una fórmula la representación en lenguaje de proposiciones de una frase declarativa, y una (sigma)-interpretación la asignación de los valores verdad o falso a los átomos de f, una fórmula es satisfactible si una asignación de valores de los átomos de f hace cierta la interpretación.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.