Skip to content

Instantly share code, notes, and snippets.

View solanoize's full-sized avatar

Solanoize solanoize

View GitHub Profile
* {
box-sizing: border-box;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
padding: 0;
}
body {
/* background-color: rgb(44, 44, 44); */
}
function getWindowDims() {
let docs = document,
win = window;
let docsEl = (docs.compatMode && docs.compatMode === 'CSS1Compat') ?
docs.documentElement : docs.body;
let width = docsEl.clientWidth;
let height = docsEl.clientHeight;
if (win.innerWidth && width > win.innerWidth) {
width = win.innerWidth;
height = win.innerHeight;
@solanoize
solanoize / app.component.css
Created January 11, 2023 10:19
Captcha Manual Angular
canvas {
background: #59b8de;
width: 250;
height: 150;
}
@solanoize
solanoize / app.component.ts
Created January 11, 2023 09:52
Access Canvas
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { IStat } from './interfaces/i-stat';
import { StatService } from './services/stat.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, AfterViewInit {
.center-me {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
<!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.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
pm.test("Response harus 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response header harus json", function () {
pm.expect(pm.response.headers.get("Content-Type"))
.to.equals("application/json; charset=utf-8")
})
pm.test("Response harus array", function () {
@solanoize
solanoize / AdsRemoverSelenium.java
Last active December 3, 2022 09:05
Source untuk menghindari ads
package com.asuransijiwa.assurance;
import java.time.Duration;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
package com.yanwar.belajar.v2;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.time.Duration;
import java.util.Map;
import org.openqa.selenium.By;
import org.openqa.selenium.Capabilities;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>