Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Shah ryankshah

View GitHub Profile
View topology.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections, pmonitor
from mininet.log import setLogLevel
from mininet.node import Controller, OVSSwitch
#from mininet.node import OVSController
View topology.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections, pmonitor
from mininet.log import setLogLevel
from mininet.node import RemoteController, OVSSwitch
#from mininet.node import OVSController
View GuiSkyrimPlayerInventory.java
package com.ryankshah.skyrimcraft.client.gui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
import java.io.IOException;
View combined.txt
This file has been truncated, but you can view the full file.
@relation 'fer2017-weka.filters.supervised.attribute.AttributeSelection-Eweka.attributeSelection.CfsSubsetEval -P 1 -E 1-Sweka.attributeSelection.BestFirst -D 1 -N 5'
@attribute pixel0 numeric
@attribute pixel1 numeric
@attribute pixel2 numeric
@attribute pixel46 numeric
@attribute pixel47 numeric
@attribute pixel48 numeric
@attribute pixel58 numeric
@attribute pixel93 numeric
@ryankshah
ryankshah / password_bcrypt.php
Created Aug 8, 2017
BCrypt Hashing And Validation Functions in PHP for Passwords
View password_bcrypt.php
<?php
/**
* Generate a secure BCrypt hash for a given password.\n
* The cost is passed to the blowfish algorithm provided
* by PHP.
*/
function generateBCryptHash($password, $cost) {
if(defined("CRYPT_BLOWFISH") && CRYPT_BLOWFISH) {
/**
* To generate the salt, we first follow the requirement
@ryankshah
ryankshah / string_to_bits.c
Created Aug 8, 2017
Convert String to Bits in C
View string_to_bits.c
char * convertStringToBits(char * string) {
int i;
int stringLength = strlen(string);
int mask = 0x80; /* 10000000 */
char *charArray;
charArray = malloc(8 * stringLength + 1);
if(charArray == NULL) {
printf("An error occured!\n");
return NULL; //error - cant use charArray
}