Skip to content

Instantly share code, notes, and snippets.

View robotsandcake's full-sized avatar
πŸ’­
Groovy

Stuart robotsandcake

πŸ’­
Groovy
View GitHub Profile
@robotsandcake
robotsandcake / screen-share.sh
Last active June 19, 2018 19:29
This bash script enables you to Screen Share with a remote machine using Apple's built-in screen sharing tools.
#!/bin/bash
# This will open Apple's Screen Sharing tool and connect to the desired machine
# Replace the username and password with the details of the remote machine you wish to connect to
# That goes for the IP address as well.
# Usage #
# Make the script executable with "chmod +x screen-share.sh" and then run it with:
# "./screen-share.sh
@robotsandcake
robotsandcake / resize-with-sips.sh
Last active March 24, 2017 18:57
This bash script will take a folder full of PNG and JPEG files, convert them into various sizes and place them into different folders based on size.
#!/bin/bash
# This work is licensed under the WTFPL.
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
# Copyright (C) 2017 Stuart Turner <[email protected]>
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
@robotsandcake
robotsandcake / .DS_Store
Last active March 24, 2017 19:01
This bash script will take a folder full of PNG and JPEG files, convert them into various sizes and place them into different folders based on size.
@robotsandcake
robotsandcake / custom-customise.yml
Last active January 19, 2018 01:28
This code will generate a customised customise.yaml file when put in the developer section of homeassistant
{% for state in states.sensor -%}
{% if loop.first %}
{% elif loop.last %}
{% else %}
{% endif %}
{{- state.entity_id }}:
friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}'
emulated_hue: {{state.attributes.emulated_hue if state.attributes.emulated_hue is defined else 'False' }}
hidden: {{state.attributes.hidden if state.attributes.hidden is defined else "False"}}
{{'icon: '+ state.attributes.icon if state.attributes.icon is defined}}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>wakestora</string>
#!/bin/bash
echo open -a /Users/yourusername/bin/KeepVolumeConnected/ConnectToNetworkDrive.app | /bin/bash
delay 10
-- Change the disk name to your Volume name.
set diskName to "Music"
tell application "System Events" to set diskNames to name of every disk
if diskName is in diskNames then
display dialog quoted form of diskName & " is already mounted." & return buttons {"OK"} default button 1
else
-- Change the credentials and olume location to suit your needs.
mount volume "afp://username:[email protected]/Music"
end if
@robotsandcake
robotsandcake / jemoji.md
Last active June 15, 2020 21:19 — forked from rxaviers/gist:7360908
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:
@robotsandcake
robotsandcake / gist:0fc4faa9e8ce85083264ba963772f83f
Created October 28, 2016 15:25 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | πŸ˜„ | πŸ˜† | 😊 | πŸ˜ƒ | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | πŸ˜† | 😁 | πŸ˜‰ | :wink2: | πŸ‘… | πŸ˜’ | πŸ˜… | πŸ˜“

😩 | πŸ˜” | 😞 | πŸ˜– | 😨 | 😰 | 😣 | 😒 | 😭 | πŸ˜‚ | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😑 | 😀 | πŸ˜ͺ | πŸ˜‹ | 😷

😎 | 😡 | πŸ‘Ώ | 😈 | 😐 | 😢 | πŸ˜‡ | πŸ‘½ | πŸ’› | πŸ’™ | πŸ’œ | ❀️ | πŸ’š | πŸ’” | πŸ’“ | πŸ’— | πŸ’• | πŸ’ž | πŸ’˜ | ✨

@robotsandcake
robotsandcake / 0-hidden-service-subdomains.md
Created September 21, 2016 09:30 — forked from mtigas/0-hidden-service-subdomains.md
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI