Skip to content

Instantly share code, notes, and snippets.

View sahwar's full-sized avatar
💭
https://twitter.com/ve4ernik

sahwar

💭
https://twitter.com/ve4ernik
View GitHub Profile

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/* ===========================================================
* bootstrap-tooltip.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@sahwar
sahwar / PHP_webscraping_script_by_OmegaKO-v4
Last active June 4, 2020 04:19
get_words_data_v4.php
<?php
### https://gist.github.com/sahwar/f2a8fdef42768dbfbb09
### get_words_data_v4.php (OLD EDITION, use v5+!!! - https://github.com/sahwar/Bulogos/blob/master/get_words_data_v5_01_dict_BG_talkoven.php )
### PHP_webscraping_script_by_OmegaKO-v4
### scraper-script-logic.txt is here: https://gist.github.com/sahwar/d6cb7e440d93b3089e33
### Преименувай този файл до името (rename this file to have the title): php get_words_data_v4.php
### NOTE (04-June-2020): It seems that http://eurodict.com has changed its HTML+CSS+JS, so this script must be adapted to fit the new HTML structure of the website. Also, sadly, it seems that the mirror-website with the old URL/URI is offline: http://bulgariandictionary.com , but they may bring it back online, who knows... There are now free Google Android apps with Bulgarian-English<->English-Bulgarian dictionary databases, probably stolen from http://eurodict.com and http://pons.bg , and later expanded with more dictionary headwords and explanations-translations, etc.
###
/* ===========================================================
* https://gist.github.com/sahwar/11c1c143cb9cc4998642
* bootstrap-tooltip.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@sahwar
sahwar / postal-codes.json
Created March 3, 2016 20:27 — forked from matthewbednarski/postal-codes.json
Global postal codes regex formats
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note":
@sahwar
sahwar / 1.html
Created July 5, 2016 04:06 — forked from stephenlb/1.html
Enter Chat and press enter
<div><input id=input placeholder=you-chat-here /></div>
Chat Output
<div id=box></div>
<script src=http://cdn.pubnub.com/pubnub.min.js></script>
<script>(function(){
var box = PUBNUB.$('box'), input = PUBNUB.$('input'), channel = 'chat';
PUBNUB.subscribe({
@sahwar
sahwar / psync.sh
Created July 26, 2016 09:40 — forked from mkaito/psync.sh
Shell helper functions to sync and backup your Android phone over Rsync + SSH. Put them in your .zshrc
# {{{ Android phone sync (PS) and backup
PS_BACKUP_DIR=~/Android/Backup # Where to keep backups
PS_BACKUP_KEEP=60 # Days to keep backups
PS_BACKUP_ENCRYPT_TO="0x00000000" # GPG key ID to sign and encrypt to
PS_IP="192.168.0.100" # The IP your device will be found at
PS_SSH="Nexus" # The SSH host of your phone, or an SSH alias
PS_STAGING=~/Android/Sync # The staging folder for sync, sans trailing slash
PS_SDCARD=/sdcard # The sync root on the phone, sans trailing slash
PS_RSYNC_OPT="-vzuLr --no-perms" # Extra options to pass to rsync
@sahwar
sahwar / android-backup
Created July 26, 2016 09:40 — forked from riyad/android-backup.md
Backup and Restore your Android Phone With ADB
#!/bin/bash
#
# Riyad Preukschas <riyad@informatik.uni-bremen.de>
#
# Backs up your Android phone's storage.
# It'll also back up your current TitaniumBackup apps for faster restoration.
# on a running Android /sdcard is symlinked to /storage/emulated/[legacy|0]
# but in TWRP it's directly mounted to /sdcard (so the other dirs aren't there)