Skip to content

Instantly share code, notes, and snippets.

//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bzzn
bzzn / msbuildr.bat
Last active November 21, 2023 15:12
Simple(?) batch script for building all solution files in a specific folder using MSBuild.
@echo off
rem Environment variables are local only and thus forgotten when script exits
setlocal
title msbuilr
set DOTNET_FRAMEWORK=4.0.30319
set MSBUILD=%systemroot%\Microsoft.NET\Framework\v%DOTNET_FRAMEWORK%\MSBuild.exe
set ROOT=.
if not exist %MSBUILD% goto :requirements_missing
@johntyree
johntyree / getBlockLists.sh
Last active June 7, 2026 04:44
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@willurd
willurd / web-servers.md
Last active July 17, 2026 18:54
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@rxaviers
rxaviers / gist:7360908
Last active July 20, 2026 04:00
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@carlosfunk
carlosfunk / install_python.ps1
Last active June 13, 2023 04:57
Powershell scripts for setting up a Python environment under Windows
# To run this file you will need to open Powershell as administrator and first run:
# Set-ExecutionPolicy Unrestricted
# Then source this script by running:
# . .\install_python.ps1
$save_dir=Resolve-Path ~/Downloads
$project_dir = "C:\Projects"
$virtualenv_dir = $project_dir + "\virtualenvs"
$client = New-Object System.Net.WebClient
function organizeData() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var fromSheet = ss.getSheetByName("Monthly link");
var toSheet = ss.getSheetByName("Name");
var aCol = fromSheet.getRange("A10:A");
var rCol = fromSheet.getRange("R10:R");
var agCol = fromSheet.getRange("AG10:AG");
var auCol = fromSheet.getRange("AU10:AU");
@juntalis
juntalis / find-msvc.cmd
Last active June 14, 2024 18:35
Utility batch script to locate Visual Studio installation
@echo off
rem Usage: find-msvc.cmd MinimumVersion MaximumVersion
rem
rem Given a range of versions to search for, this script attempts to locate a
rem valid Visual Studio installation based upon the current set of environment
rem variables. If a valid installation is found, this script sets the
rem environment variable "VCROOT" to Drive:\Path\To\VS\VC. On success, we
rem should be able to call %VCROOT%\vcvarsall.bat.
rem
rem Versions use the VSXX0COMNTOOLS environment variable:
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Applicative ((<$>))
import Data.List
import Data.Maybe (mapMaybe)
import Data.Word (Word)
import Data.Char (isSpace)