Skip to content

Instantly share code, notes, and snippets.

View rizesky's full-sized avatar
🏠
Working from home

zes rizesky

🏠
Working from home
View GitHub Profile
@rizesky
rizesky / getPrimeNumberList.js
Created July 10, 2019 04:24
Get list of Prime Number over specified range
// Function to get list of prime numbers over the specified range
// Return type : Array
function getPrimeNumberList(n) {
//store 2,3 as base value of prime numbers
var primeNumberList = [2, 3];
for (var i = 5; i <= n; i += 2) {
if (primeNumberList.every(function(p) { return i % p; })) {
primeNumberList.push(i);
}
}
@rizesky
rizesky / howToSolve.md
Created April 8, 2019 03:48
Ubuntu USB Bootable is skipped by BIOS Issue

Ubuntu USB Bootable is skipped by BIOS

Mode 1

  • Change the usb bootable tools, try Etcher

Mode 2

  • Make sure bios support for legacy mode
@rizesky
rizesky / prevent.js
Created April 5, 2019 07:02
Preventing inspect element from client browser(not working on browser for developer)
window.onload = function() {
document.addEventListener("contextmenu", function(e){
e.preventDefault();
}, false);
document.addEventListener("keydown", function(e) {
//document.onkeydown = function(e) {
// "I" key
if (e.ctrlKey && e.shiftKey && e.keyCode ==73) {
disabledEvent(e);
}