Skip to content

Instantly share code, notes, and snippets.

View netcookies's full-sized avatar
💭
I may be slow to respond.

Isulew netcookies

💭
I may be slow to respond.
View GitHub Profile
Subject: Thanks for signing up!
Date: {{date}}
To: {{recipient}}
From: {{sender}}
MIME-Version: 1.0
Content-Type: text/plain
Thanks for signing up for the Foobar service!
Your email address is: {{recipient}}
@horsley
horsley / index.php
Created January 4, 2014 06:14
sms + tasker转发服务的脚本
<?php
define('APP_PATH', dirname(__FILE__));
define('DATA_FILE', APP_PATH. '/sms.htdata');
if ($_SERVER['REQUEST_METHOD'] == 'POST') { //tasker提交
if (!isset($_POST['c'])) {
die('Invalid Request!');
} else {
$data = '';
if (file_exists(DATA_FILE)) { //读入已有数据
@richy486
richy486 / xcClean.sh
Last active November 22, 2019 18:28
Xcode clean up
#!/bin/bash
# Clean Xcode files
# @richy486 https://gist.github.com/richy486
# http://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac
STATUS='\033[0;36m'
WARNING='\033[0;33m'
ERROR='\033[0;31m'
CMD='\033[0;92m'
NC='\033[0m' # No Color
@rdempsey
rdempsey / python_3_email_with_attachment.py
Created December 6, 2014 21:30
Use Python 3 to send an email with an attachment using Gmail
#!/usr/bin/env python
# encoding: utf-8
"""
python_3_email_with_attachment.py
Created by Robert Dempsey on 12/6/14.
Copyright (c) 2014 Robert Dempsey. Use at your own peril.
This script works with Python 3.x
NOTE: replace values in ALL CAPS with your own values
@gwarnes-mdsol
gwarnes-mdsol / gdiff
Last active March 16, 2021 04:43 — forked from miner/gdiff
Use FileMerge as git difftool on Mac OS X
#!/bin/bash
#
# A git difftool for Mac OS X that uses FileMerge from XCode
#
# source: https://gist.github.com/gwarnes-mdsol/b0aff96fbb7a4c92e570e7b03daa7e1b
#
# Setup:
#
# 1. Copy this file to a known path, e.g. $HOME/bin/gdiff
# 2. Make the file executable:
@gustinmi
gustinmi / gist:280ef29a18580eee7e4f
Created January 23, 2015 21:31
Javascript tab panel using pure javascript
<!DOCTYPE html>
<html>
<head>
<title>tabs demo</title>
<style type="text/css">
.tabs ul {
list-style-type: none;
margin: 0 2em;
padding: 0;
cursor: pointer;
@haircut
haircut / Install PIP to user site on macOS.md
Created August 29, 2017 21:50
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@superbrothers
superbrothers / release.yaml
Last active October 28, 2023 15:01
Create a GitHub Release and upload multiple assets in GitHub Actions
name: Release
on:
push:
tags: ["v*"]
jobs:
run:
runs-on: ubuntu-latest
steps: