Skip to content

Instantly share code, notes, and snippets.

View Moscarda's full-sized avatar

Moscarda

View GitHub Profile
@Moscarda
Moscarda / osx-defaults.sh
Created February 14, 2018 03:37 — forked from scottstanfield/osx-defaults.sh
Lots of OSX defaults
#!/bin/sh
# 90% from http://mths.be/osx
# ask for admin password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@Moscarda
Moscarda / osx-defaults.sh
Created February 14, 2018 03:37 — forked from scottstanfield/osx-defaults.sh
Lots of OSX defaults
#!/bin/sh
# 90% from http://mths.be/osx
# ask for admin password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@Moscarda
Moscarda / getBlockLists.sh
Created February 2, 2018 19:49 — forked from johntyree/getBlockLists.sh
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 '^#'
@Moscarda
Moscarda / activate_tab.applescript
Created November 29, 2017 06:11 — forked from dblandin/activate_tab.applescript
AppleScript to grab a list of tab titles from Google Chrome.
# Activate tab
# $ osascript activate_tab.applescript 1, 2
on run argv
set window_index to item 1 in argv
set target_index to item 2 in argv
tell application "Google Chrome" to set active tab index of first window to target_index
tell application "Google Chrome" to activate
end run
@Moscarda
Moscarda / index.html
Created October 26, 2017 05:15
Sticky player
<div class="container">
<div class="header">
<div class="browse"></div>
</div>
<div class="col-1">
<div class="covercard"></div>
<div class="spine">
<div class="now-reading">
<div class="progress-bar"></div>
@Moscarda
Moscarda / ø.woff
Created September 2, 2017 07:28
Example of incomplete font-info in woff webfonts, for StackOverflow
@font-face {
font-family: 'DeVinneWeb-Roman';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGiwAA8AAAAAp7gAAQAAAABmEAAAAqAAAAVNAAAAAAAAAABPUy8yAAABWAAAAFoAAABgv77z9FZETVgAAAG0AAADbwAABeBu3XZeY21hcAAABSQAAAHcAAACcN7bIYBjdnQgAAAHAAAAAF8AAAHkDI4LymZwZ20AAAdgAAAFKwAACVChzIUPZ2FzcAAADIwAAAAIAAAACP//AARnbHlmAAAMlAAAUG8AAIT0V3DoG2hlYWQAAF0EAAAANgAAADboxcLdaGhlYQAAXTwAAAAhAAAAJA+8B8tobXR4AABdYAAAAnwAAAQUeIRZDWxvY2EAAF/cAAACsAAABBgASItgbWF4cAAAYowAAAAgAAAAIAKbAYhuYW1lAABirAAAAXQAAALKIYglb3Bvc3QAAGQgAAAAEwAAACD/IgAycHJlcAAAZDQAAAHZAAACSPgVOEd4nGNgZkljnMDAysDA6s5yhoHhXzGEZhJiiGNKY2ZkYmJj4WBnZWJmbmBgWC/AoODFAAVOmSXFDA4MCr+Z2ET+iTDOYq9nfAwUFgTJMYex+gApBQYmAMw4DlsAAHicHcxTdB4IGIThd++ytW3btm3btm3btm2badC4adoGTdK4Yd2U387+M+c8N3PO8A/q/yEdqU6GE072l38dpiGNTCv/aE0r05NOZiC9zEgG+00mMsrMZJJZyCyzkkVmI6v9IjvZZA6yy5zkkLnkT3KTU+Yhl8xLbpmPPPaD/OSVBcgnC5JfFqKApVKYgrIIhWRRCstiFJHFKWrfKUExWZLispTD0pSwb5ShpCxLKVmO0rI8ZewrFSgrK1JOVqK8rEwF+0IVKsqqVJLVqCyrU8U+U4OqsibVZC2Htaku61DDPlGXmrIetWR9assG1LGPNKSubEQ92Zj6sgkN7AN
@Moscarda
Moscarda / mod_rewrites
Created May 25, 2017 16:22 — forked from redesigned/mod_rewrites
Helpful Mod Rewrites and .htaccess rules
#### IMAGE PROTECTION ####
#protect images from hotlinking
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|bmp|tiff|svg)$ - [NC,F,L]
#protect images from hotlinking send new image
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC]
@Moscarda
Moscarda / deploy_branch.sh
Created May 22, 2016 07:02 — forked from toolmantim/deploy_branch.sh
An example Buildbox deploy script for automatically deploying branches of a site or application to different subdomains. So you could have always-up-to-date copies of a branches available at http://<branch>.dev.mysite.com/
#!/usr/bin/env bash
# An example Buildbox deploy script for automatically deploying branches of a
# site or application to different subdomains. So you can have an
# always-up-to-date copy of a branch being available at http://branch.dev.mysite.com/
#
# This copies the currently checked out code to /var/www/<branch name>. You'd
# then configure your web server to dynamically map subdomains to /var/www.
#
# You could just as easily push the branch to Heroku or FTP it to a remote server.
@Moscarda
Moscarda / git-version-control.markdown
Created March 20, 2016 20:53 — forked from albatrocity/git-version-control.markdown
Some basic Git instructions for Github for Mac and the command line

Using Git version control for code projects

Creating a new code repo from a local working copy

  1. From the repositories view in the app, drag the project folder to the bottom of the left sidebar.
  2. Hit "Yes" when it asks if you want to create a local git repository
  3. Go to "Changes" view (⌘2)
  4. Select the files that you want to commit their current state to the repository. You can view the changes of the file by clicking on the double up arrow on the file name bar.
@Moscarda
Moscarda / disposable-email-provider-domains
Created March 15, 2016 18:33
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com