This file contains 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
$$('.apt-list__list .apt-list__item').map(parent => ({ | |
name: parent.querySelector('.apt-list__item-name').textContent, | |
address: parent.querySelector('.apt-list__item-address').textContent, | |
/*findMe: parent.querySelector('.apt-list__item-find-me').textContent,*/ | |
})) | |
.map(place => `<option value="${place.name}">${place.name} (${place.address})</option>`).join('\n') |
This file contains 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
function buildTree($flat, $pidKey, $idKey = null) { | |
$grouped = array(); | |
foreach ($flat as $sub) { | |
$sub->depth = 0; | |
$grouped[$sub->{$pidKey}][] = $sub; | |
} | |
$fnBuilder = function ($siblings, $depth) use (&$fnBuilder, $grouped, $idKey) { | |
foreach ($siblings as $k => $sibling) { | |
$id = $sibling->{$idKey}; |
This file contains 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 nCore - Thumbnail preview | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Adds cover image lext to list view | |
// @author You | |
// @match https://ncore.cc/torrents.php* | |
// @grant none | |
// ==/UserScript== |
This file contains 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
import requests | |
import sys | |
import xml.etree.ElementTree as XmlElement | |
from flask import Flask, Response | |
if len(sys.argv) == 1: | |
raise Exception('Provide nCore key as the first argument!') | |
NCORE_URL = 'https://ncore.cc/rss.php?key=' + sys.argv[1] |
This file contains 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
alias ls="ls -hal " | |
# Fix wifi problem on Ubuntu | |
alias fixwifi="sudo service network-manager restart && sudo ifconfig wlo1 up" | |
alias wifix="fixwifi" | |
# Set screen rotation to normal | |
alias fixscreen="xrandr -o normal" | |
# Stop all docker containers that are running |
This file contains 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
import os | |
import re | |
import time | |
print(os.getcwd()) | |
def get_part(filename, part): | |
season = re.search(r"" + part + "\d{2}", filename.lower()) | |
if season: | |
season = season.start() |
This file contains 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
number_count = 30 | |
list = [0, 1] | |
for i in range(0, number_count - 2): | |
list.append(list[-1] + list[-2]) | |
for j in list: | |
print j |
This file contains 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Codecool e-mail signature generator</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/sandstone/bootstrap.min.css" rel="stylesheet" integrity="sha384-QqZs0aSOGFan3GWVdP4PyCBp6icaF/4n8Q+wsmZUTiiVIqE4r4tFYcb8Osf+8y45" crossorigin="anonymous"> | |
</head> |
This file contains 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
var x,u=((x)+[]),f=![]+[],c=String.fromCharCode;u[2]+f[1]+u[1]+u[5]+f[4]+f[2]+f[3]+f[1]+f[2]+f[1]+c(u[1].charCodeAt(0)-1)+c(u[1].charCodeAt(0)^1)+u[1] |
This file contains 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
/* | |
* Hi, this is a little code, that you can run on a Cisco CCNA test and it will answer every question for you. | |
* Please, learn the lecture! | |
* | |
* I can't garantee anything! If you use this and you fail... Well, it's your falt. | |
* Cisco used to change a bit in the texts of the questions, so I can't garantee that this code will even work after some weeks, but I hope ;) | |
* | |
* | |
* | |
* To run it, just simply: |
NewerOlder