Skip to content

Instantly share code, notes, and snippets.

@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@Atem18
Atem18 / gist:4696071
Last active April 19, 2024 11:18 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@Griever
Griever / LinkDragSelectionForChrome.user.js
Created February 21, 2013 14:47
Chrome で Opera 風のリンクテキストの選択を再現するスクリプト
// ==UserScript==
// @name LinkDragSelectionForChrome
// @description Opera like link selection for chrome.
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @license MIT License
// @match http://*/*
// @match https://*/*
// @version 0.0.1
// ==/UserScript==
@n8henrie
n8henrie / UpdateiOSApps.applescript
Last active March 7, 2018 17:22
Uses UI Scripting to Update iOS Apps in iTunes
(*
Many thanks to those unknowing contributers that share their Applescript on the web. A few that helped with this script include:
- Most of the UI Scripting came from Yoshimasa Niwa here: https://gist.github.com/4223249
- Code for checking if an app is running came from here: http://codesnippets.joyent.com/posts/show/1124
#### n8henrie Sat Mar 16 14:41:41 MDT 2013
* Added several delays that seemed to be responsible for breaking this script in iTunes 11
#### n8henrie Sun Mar 17 09:57:47 MDT 2013
* Added compatibility with iTunes 10 (untested, please confirm if you can)
@deanishe
deanishe / workflow-install.py
Last active July 29, 2024 18:06
Script to install/symlink Alfred workflows. Useful for workflow developers.
#!/usr/bin/python
# encoding: utf-8
#
# Copyright (c) 2013 <deanishe@deanishe.net>.
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2013-11-01
#
@deanishe
deanishe / toggle-alfred-theme.bash
Last active August 24, 2020 03:08
Automatically toggle Alfred dark/light themes at sunset/sunrise. You need to edit the location settings before use.
#!/bin/bash -e
# Wrapper for the toggle_alfred_theme.py script at
# https://gist.github.com/deanishe/ce442c3a768adedc9c39
# (where this script also comes from)
#
# The purpose of this wrapper is to enable you to update the Python script
# without having to edit the script to change the settings each time. You keep
# them in here instead, and this script should hopefully prove dumb enough
# to require little updating...
ruleSets:
- name: Potatso Adblock Config
rules:
# Some services are available locally
- DOMAIN-MATCH,aka,Proxy
- DOMAIN-SUFFIX,edu.cn,DIRECT
# Apple
- DOMAIN-SUFFIX,apple.co,Proxy
# You can download this config from: http://surge.run/config-example/ios.conf
# Edit with your computer and copy back to iOS device via iTunes, URL, AirDrop
# or iCloud Drive
# Version 2.0
[General]
# Log level: warning, notify, info, verbose (Default: notify)
loglevel = notify
# Skip domain or IP range. These hosts will not be processed by Surge Proxy.
# (In macOS version when Set as System Proxy enabled, these hosts will be