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 <[email protected]>
*
* 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'