Skip to content

Instantly share code, notes, and snippets.

View Danielkaas94's full-sized avatar
💜
Unconditional love to everyone

Daniel Kaas Bundgaard Jørgensen Danielkaas94

💜
Unconditional love to everyone
View GitHub Profile
@Danielkaas94
Danielkaas94 / checkBios.bat
Created September 24, 2019 07:49
How to check bios version with CMD
wmic bios get smbiosbiosversion
@Danielkaas94
Danielkaas94 / form.component.ts
Last active February 22, 2019 12:59
Forms & Validations
import { Component, OnInit, Input } from '@angular/core';
import { Validators, FormBuilder, FormControl, FormGroup } from "@angular/forms";
@Component({
selector: 'app-form',
templateUrl: './form.component.html',
styleUrls: ['./form.component.css']
})
export class FormComponent implements OnInit {
<h1>Hello World 🌍</h1>
<h2>@Outputs() can be a struggle:</h2>
<h3> {{ParentDataObject.name}} </h3>
<h3> {{ParentDataObject.age}} </h3>
<!-- [myAwesomeInputvalue] = @Input('myAwesomeInputvalue') fra child.component.ts -->
<!-- (myOutputValue) = @Output eventEmitter fra child.component.ts -->
<!-- "awesomeMethod($event) = Metode i app.component.ts -->
<app-child [myAwesomeInputvalue]="3+5+7" (myOutputValue)="awesomeMethod($event)"></app-child>
@Danielkaas94
Danielkaas94 / DanceElement.js
Created April 17, 2018 18:25
Dancing element
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0)
@Danielkaas94
Danielkaas94 / Edit.js
Created April 17, 2018 18:24
Edit Website
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
@Danielkaas94
Danielkaas94 / FindingSpoofedWebsites.js
Created April 17, 2018 18:22
Finding Spoofed Websites
javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");
@Danielkaas94
Danielkaas94 / Katami.js
Created April 17, 2018 18:21
Katami Hack
javascript:var i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);
@Danielkaas94
Danielkaas94 / Astroid.js
Created April 17, 2018 18:17
Astroid shooting on WebSite
javascript:var s = document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);
@Danielkaas94
Danielkaas94 / ExecuteCMDCommand.cs
Created February 28, 2018 16:39
ExecuteCMDCommand. strCommandToCMD is the command it can be something as "netsh wlan show networks"
private void ExecuteCMDCommand(string strCommandToCMD)
{
Process cmd = new Process();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.UseShellExecute = false;
cmd.Start();
@Danielkaas94
Danielkaas94 / ToCamelCase.cs
Created February 8, 2018 18:02
ToCamelCase & ToCamelCase2
/// <summary>
/// Converts dash/underscore delimited words into camel casing.
/// The first word within the output should be capitalized only if the original word was capitalized.
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static string ToCamelCase(string str)
{
StringBuilder sb = new StringBuilder();
string tempStr = str;