Skip to content

Instantly share code, notes, and snippets.

View vincentntang's full-sized avatar
💭
¯\_(ツ)_/¯

Vincent Tang vincentntang

💭
¯\_(ツ)_/¯
View GitHub Profile
@ferstar
ferstar / code_highlight_addon.py
Last active April 8, 2018 15:09
fix an anki plugin bugs which was called "Syntax Highlighting for Code"
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import codecs
import os
import sys
from aqt import editor, addons, mw
@planetoftheweb
planetoftheweb / tagline.coffee
Created May 8, 2014 16:39
Sample CoffeeScript files for my ultimate workflows course
do fill = (item = 'The most creative minds in Art') ->
$('.tagline').append "#{item}"
fill
@planetoftheweb
planetoftheweb / rclick.js
Created May 8, 2014 22:42
Right click on images with a class of rclick to let you preview high res versions.
var rclick = function() {
var myNodes = document.querySelectorAll(".rclick");
for (var i=0; i<myNodes.length; i++) {
myNodes[i].addEventListener("contextmenu", function(e) {
e.preventDefault();
if (e.target.tagName === 'IMG') {
if (document.querySelector('.preview')== null) {
var myElement = document.createElement('div');
myElement.className = 'preview';
@planetoftheweb
planetoftheweb / pixgrid.js
Created May 8, 2014 22:40
Lightbox that reads from a list of images with a class called pixgrid and then shows high res versions in a lightbox.
var pixgrid = function() {
function centerImage(theImage) {
var myDifX = (window.innerWidth - theImage.width) / 2, myDifY = (window.innerHeight - theImage.height) / 2;
return theImage.style.top = myDifY + "px", theImage.style.left = myDifX + "px",
theImage;
}
var myNodes = document.querySelectorAll(".pixgrid");
for (var i=0; i<myNodes.length; i++) {
myNodes[i].addEventListener("click", function(e) {
if ("IMG" === e.target.tagName) {
@planetoftheweb
planetoftheweb / data.json
Created May 8, 2014 23:20
data.json file for a list of speakers.
{ "speakers" : [
{
"name":"Mr Bellingham",
"shortname":"Barot_Bellingham",
"reknown":"Royal Academy of Painting and Sculpture",
"bio":"Barot has just finished his final year at The Royal Academy of Painting and Sculpture, where he excelled in glass etching paintings and portraiture. Hailed as one of the most diverse artists of his generation, Barot is equally as skilled with watercolors as he is with oils, and is just as well-balanced in different subject areas. Barot's collection entitled \"The Un-Collection\" will adorn the walls of Gilbert Hall, depicting his range of skills and sensibilities - all of them, uniquely Barot, yet undeniably different"
},
{
"name":"Jonathan G. Ferrar II",
"shortname":"Jonathan_Ferrar",
@planetoftheweb
planetoftheweb / sassfiles.scss
Last active February 23, 2020 11:52
Sass Files for my course on workflows
// style.scss
// ==============
//Compass imports
@import "compass";
@import "compass/css3/box-shadow";
//Core partials
@import "variables";
@import "mixins";
@drosenstark
drosenstark / workflowyPlusRefac.js
Last active November 15, 2020 14:45
Userscript to display images and iframes in Workflowy
// ==UserScript==
// @name WorkflowyPlus Refac
// @namespace http://confusionstudios.com
// @version 0.2
// @author Wizmann, DR2050
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
@mattbowen
mattbowen / mm2oo.py
Created July 3, 2011 03:29
Mindmeister to OPML: Convert the JSON file in mindmeister's native format into OPML to open with OmniOutliner
"""
Mindmeister to OPML
Convert the JSON file embedded in mindmeister's native format
to OPML 1.0 that can be opened by OmniOutliner. For use with
python 2.6 and above. For usage, run python mm2oo.py --help
Copyright (c) 2011 Matt Bowen (https://github.com/mattbowen)
Permission is hereby granted, free of charge, to any person obtaining a copy of

Suncoast Developer’s Guild’s Guide for Junior Developers

Or

How to Not Shit the Bed at Your First Job:

This is a compiled list of advice I was given by a group of software developers in the Suncoast Developers Guild slack group when I accepted my first job as a junior developer.


@ChewingPencils
ChewingPencils / rename_pinboard_tag.py
Created November 30, 2012 21:51
Rename Pinboard Tag
#!/usr/bin/env python
# A quick and dirty script to rename a pinboard.in tag.
# I'll probably update this become a proper command line app one day
import urllib2
import pinboard
pinuser = ""
pinpasswd = ""