Skip to content

Instantly share code, notes, and snippets.

View shahidcodes's full-sized avatar

Shahid Kamal shahidcodes

View GitHub Profile
@shahidcodes
shahidcodes / index.html
Last active July 17, 2017 09:43
Simple todo app design
<html>
<head>
<title>You have things left to do..</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/vue.resource/1.0.3/vue-resource.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:200" rel="stylesheet">
<style>
body{
font-family: 'Nunito Sans', sans-serif;
background-color:#252627;
function largestOfFour(arr) {
// You can do this!
// Override Array Object
Array.prototype.max = function(){
piv = 0
this.forEach((n)=>{
if(piv<n ) {
piv = n
}
})
@shahidcodes
shahidcodes / confirm-the-ending.js
Created April 12, 2017 11:28
FreeCodeCamp Javascript Algorithm | Confirm The Ending
function confirmEnding(str, target) {
// "Never give up and good luck will find you."
// -- Falcor
if(target.length == 1) return str.substr(-1) == target;
else{
boo = str.split(" ").reverse()[0].includes(target);
console.log( boo );
return boo;
}
function chunkArrayInGroups(arr, size) {
// Break it up.
var times = arr.length / size;
console.log(times);
var f = 0, e = size;
var narr = [];
for(var i=0; i<times; i++){
narr.push ( arr.slice(f, e) );
f = e;
@shahidcodes
shahidcodes / index.html
Last active July 17, 2017 09:39
CalculatorCalculator using vuejs for freeCodeCamp// source https://jsbin.com/yewirey
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Calculator using vuejs for freeCodeCamp">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css">
<title>Calculator</title>
<style>
@shahidcodes
shahidcodes / structure-of-tweepy-status-object.json
Created August 4, 2017 19:12
the structure of the Status object of Tweepy
/* json.dumps(StatusObject._json) */
{
"created_at": "Thu Jul 28 00:08:39 +0000 2016",
"in_reply_to_status_id": null,
"id_str": "758454081656467456",
"retweeted": false,
"entities": {
"hashtags": [
{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
body {
background-color: #00A6A6;
color: #BBDEF0;
var scrollCount = 0
var btns = [];
let delay = 0
var addConnections = ()=>{
btns.forEach(el=>{
delay += Math.floor(Math.random()*3000);
console.log("btn set to auto click after " + delay + "ms")
setTimeout(()=>{
el.click();
}, delay)
@shahidcodes
shahidcodes / instruction.txt
Created April 30, 2019 11:16
windows 10 hidden host (marked as system file) fixed.txt
From a command prompt with administrative access type each of the following commands:
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /G BUILTIN\Users:R
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G "BUILTIN\Power Users:R"
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G BUILTIN\Administrators:F
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G "NT AUTHORITY\SYSTEM:F"
ATTRIB.EXE -S -H +A -R C:\WINDOWS\system32\drivers\etc\hosts
If this doesn't resolve the issue you will need a better program to do it. Download SubInACL from Microsoft. You can work up the syntax for taking ownership or I'll do it if you can't figure it out.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.rawgit.com/Marak/faker.js/master/examples/browser/js/faker.js"></script>
</head>
<body>