Skip to content

Instantly share code, notes, and snippets.

View pida42's full-sized avatar
🐋

pida42 pida42

🐋
  • Magrathean Republic
  • Earth... Sometimes Magrathea...
View GitHub Profile
@pida42
pida42 / techniky-vyhledavani-pomoci-google.md
Last active October 22, 2021 12:34
Techniky vyhledávání pomocí Google

Techniky vyhledávání pomocí Google

Vyhledávací nástroj Google naleznate na internetové stránce www.google.com. Nabídne vám různé možnosti vyhledávání. Prohledává web, obrázky, skupiny a adresář. Tyto možnosti poskytují spoustu výhod pro snadné surfování na internetu, ale dovolují i daleko více nečistých možností zcela zlomyslným internetovým uživatelům jako hackerům, počítačovým zločincům, zlodějům identit a dokonce i teroristům.
Tento dokument poukazuje na černé stránky vyhledávače Google s tím, že bychom pro něj společně mohli používat termín "Google hacking". Cílem

@spiralx
spiralx / copy-to-clipboard.js
Created November 15, 2016 15:11
Copy text to the clipboard
(function() {
'use strict'
// --------------------------------------------------------------------------
window.copyToClipboard = function copyToClipboard (value) {
if (!value) return // Can't copy zero characters!
const $input = Object.assign(document.createElement('input'), {
type: 'text',
@spiralx
spiralx / copy-on-click.js
Created May 20, 2016 11:11
An ES6 class for auto-copying text content to the clipboard when particular elements are clicked
/* jshint asi: true, esnext: true */
; (function() {
'use strict'
/*
Iterator for a selection's range objects e.g.
const r = [...ranges()]
*/
@pida42
pida42 / Benchmark.php
Last active May 31, 2016 04:38
Simple benchmark class that allows you write markers in code and get info about exec time, memory usage and more...
<?php
/*
* The MIT License
*
* Copyright (c) 2016 Frantisek Preissler <github@ntisek.cz>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@spiralx
spiralx / .bashrc
Last active July 13, 2021 04:16
Current Bash profile used by Git Bash
#!/bin/sh
source ~/shell/colours.sh
B1=" ${YELLOW} ♦ ${YELLOW}"
B2=" ${CYAN} ● ${WHITE}"
#B2=" ${BCYAN} ○ ${WHITE}"
echo
echo -e "${B1}Welcome ${BBLUE}${USERNAME}${YELLOW}!${RESET}"
@spiralx
spiralx / cache.js
Created January 26, 2016 18:58
Simple key-object cache with Greasemonkey and local storage options
'use strict';
// --------------------------------------------------------------------
class Cache extends Map {
constructor(key) {
super()
this._key = key
this.load()
}
@mjf
mjf / changed
Created March 28, 2013 10:58
Shell script to detect file or directory has changed using ls, sha1sum, mv and cmp
#! /bin/sh
checksum=`echo $@ | sha1sum - | cut -d ' ' -f 1`
if ! [ -e /tmp/$checksum.ls-ZlaR ]
then
if ! ls -ZlaR $@ > /tmp/$checksum.ls-ZlaR
then
echo changed: could not create /tmp/$checksum.ls-ZlaR 1>&2
exit 1
@mjf
mjf / man2pdf.sh
Created September 4, 2012 12:53
man2pdf -- Convert manual page to PDF via PS
#! /bin/sh
# man2pdf -- Convert manual page to PDF via PS
# Copyright (C) 2012 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
groff='groff -Tps -mandoc'
ps2pdf='ps2pdf -'
file=file
man='man -w'