Skip to content

Instantly share code, notes, and snippets.

View boazcstrike's full-sized avatar
:octocat:
Please teach me how to code

Boaz Sze boazcstrike

:octocat:
Please teach me how to code
  • Mind You Mental Health Systems
  • Manila, Philippines
  • X @boazcstrike
View GitHub Profile
@boazcstrike
boazcstrike / conn_sql_server.aspx.cs
Last active December 28, 2020 20:13
SQL server connection in C# asp.net
using System.Data.SqlClient;
namespace Eth4You{
public partial class miner_test : System.Web.UI.Page{
public void test()
{
string connString = "Server=PCNAME\\SQLEXPRESS;Database=DB_name;User Id=username;Password=yourpassword;";
@boazcstrike
boazcstrike / sample_web_form.aspx
Created September 2, 2017 07:26
This is a sample webform for my medium blog.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="miner_test.aspx.cs" Inherits="Eth4You.miner_test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form runat="server">
<?php
include("sql_connection_file.php");
if(isset($_POST[user_form])){
$sqlquery = mysqli_query($link,"SELECT * FROM login_user WHERE username ='$username' AND password = md5('$password')");
$username = mysqli_real_escape_string($link,stripslashes($_POST['username']));
$init_password = mysqli_real_escape_string($link,stripslashes($_POST['password']));
}
?>
<?php
//this is for an example of an SQL select statement, creating a "preparation" for the SQL statement to be executed
$select_userq = $link->prepare("SELECT * FROM login_user WHERE username = ? AND password = ?");
//next is we bind the parameters to make sure which variables are to be inserted in the question marks
$select_userq->bind_param("ss",$username,$crypted_password);//before the first comma, is i for integer or s for string, etc.
//password encryption
$crypted_password = crypt($password, "randomcharacters!@#%^*()");
@boazcstrike
boazcstrike / typewriter-effect.html
Last active September 21, 2017 07:12
This is the javascript typewriter effect using arrays, without letter styles
<!DOCTYPE html>
<html lang="EN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@boazcstrike
boazcstrike / typewriter-narrative.html
Created September 21, 2017 06:26
underline blinker for narrative typewrite
<h1>
<a href="" class="typewrite" data-period="2000" data-type='[ "Hi, Im Si.", "I am Creative.", "I Love Design.", "I Love to Develop." ]'>
<span class="wrap"></span>
</a>
</h1>
<style>
body {
font-family: 'Waiting for the Sunrise', cursive;
font-size:30px;
margin: 10px 50px;
@boazcstrike
boazcstrike / typewriter-coding.html
Created September 21, 2017 06:29
coding style or longer text typewriting effect
<pre id="typewriter">
<span class="var-highlight">var</span> object = {
name: <span class="string-highlight">'Foo'</span>,
type: <span class="string-highlight">'Bar'</span>,
location: <span class="string-highlight">'Earth'</span>,
properties:[<span class="string-highlight">'Javascript'</span>,
<span class="string-highlight">'HTML'</span>,
<span class="string-highlight">'CSS'</span>];
};
</pre>
@boazcstrike
boazcstrike / sql_conn.php
Last active October 4, 2017 04:59
establish a connection for your sql database and select the database initially
<?php
//SQL CONNECTION
$url = '';
$db_user = '';
$db_pass = '';
$db = '';
$conn = mysqli_connect($url, $db_user, $db_pass, $db);
if(!$conn){
@boazcstrike
boazcstrike / pubg-pinger-bot.js
Created October 3, 2017 14:53
A simple discord bot that pings the pubg servers
var Discord = require('discord.io');
var logger = require('winston');
var auth = require('./auth.json');
var ping = require('ping');
const fs = require("fs");
var hosts = ["13.228.0.251", "46.51.216.14", "46.137.255.254", "52.74.0.2", "52.76.0.2", "52.76.191.252", "52.77.63.252", "52.221.255.252","54.151.128.2", "54.169.0.2", "54.169.191.253", "54.179.0.2", "54.179.191.252", "54.251.63.255","54.254.128.1", "54.255.0.2", "122.248.255.254", "175.41.146.190", "13.54.63.252", "52.62.63.252", "52.64.63.253", "52.64.191.252", "52.65.63.252", "54.66.0.2", "54.66.191.252", "54.79.127.252", "54.153.191.252", "54.206.127.254", "54.206.128.2", "54.252.88.8", "54.253.0.1"];
var msglg = "";
// Configure logger settings
@boazcstrike
boazcstrike / style-template.scss
Last active March 8, 2018 04:43
This will help in future designs of my client's websites
/* ==================================================
Color Variables
_bovariables.scss
================================================== */
// Cool
$aqua: #7FDBFF;
$blue: #0074D9;
$navy: #001F3F;
$teal: #39CCCC;