This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def searchinfile(srchstr, filename): | |
with open(filename) as f: | |
wasd = 0 | |
for line in f: | |
#print(line.lower(), end='') | |
tolwr = line.lower() | |
if srchstr in tolwr: | |
#print("found test in: " + line) | |
wasd += 1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Wikipedia search focus | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description focus focus focus | |
// @author nake89 | |
// @match https://en.wikipedia.org/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mulda { | |
constructor(a, b) { | |
var mulda = new Array(a) | |
for (var x = 0; x < a; x++) { | |
mulda[x] = new Array(b) | |
} | |
return mulda | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
localhost | |
on startup php-cgi -b 10000 & | |
fastcgi / 127.0.0.1:10000 php | |
root . | |
errors stderr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Canvas { | |
constructor(x, y) { | |
this.x = x | |
this.y = y | |
this.canvas = document.createElement("canvas") | |
this.ctx = this.canvas.getContext("2d") | |
document.body.appendChild(this.canvas) | |
this.ctx.fillStyle = "rgb(51, 51, 51)" | |
this.ctx.fillRect(0, 0, x, y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"creation_date": { $exists: true }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake i3status suckless-tools | |
cd /tmp | |
# clone the repository | |
git clone https://www.github.com/Airblader/i3 i3-gaps | |
cd i3-gaps | |
# compile & install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let body = req.body | |
let url = req.url | |
let original_url = req.originalUrl | |
let method = req.method |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Hello</title> | |
</head> |
OlderNewer