Skip to content

Instantly share code, notes, and snippets.

View ipruning's full-sized avatar
👨‍💻
Coding

ipruning ipruning

👨‍💻
Coding
  • Edinburgh, UK ⇌ Shanghai, China
  • X @ipruning
View GitHub Profile
@stared
stared / software_for_scientists.md
Last active August 7, 2024 10:40
Software for scientists: community-edited list of general-purpose software for scientists.

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 18:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@bradleybossard
bradleybossard / titleUrlMarkdownClip.js
Created December 5, 2015 21:09
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
"""
A TestRunner for use with the Python unit testing framework. It
generates a tabular report to show the result at a glance.
The simplest way to use this is to invoke its main method. E.g.
import unittest
import TestRunner
... define your tests ...
@chroju
chroju / surfingkeys.js
Last active November 15, 2024 17:11
surfingkeys
// option
settings.smoothScroll = false;
settings.omnibarPosition = 'bottom';
settings.hintAlign = 'left';
settings.focusAfterClosed = 'left';
settings.smartCase = false;
// chrome.storage.local.set({"noPdfViewer": 1})
// https://github.com/brookhong/Surfingkeys/issues/2159
// disable surfingkeys
@catbaron0
catbaron0 / SurfingkeysDraculaThemeAttempt.txt
Last active August 23, 2022 05:03 — forked from emraher/SurfingkeysDraculaThemeAttempt.txt
Surfingkeys Dracula Theme Attempt
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
@hytor-yang
hytor-yang / surfingkeys-load-settings-from-me.js
Last active April 2, 2024 03:31
Surfingkeys customization with jd/douban/taobao search and copy tab(s) as markdown feature.
const {
aceVimMap,
mapkey,
imap,
imapkey,
insertJS,
getClickableElements,
vmapkey,
map,
unmap,
@ethanhuang13
ethanhuang13 / VirtualKeyboard.swift
Last active February 7, 2024 05:58
MacBook Air M1 Zhuyin Keyboard written with SwiftUI ~=300 LOC, < 4hrs
//
// VirtualKeyboard.swift
// MacBook Air M1 Zhuyin Keyboard
// Written with SwiftUI ~=300 LOC, < 4hrs
// Created by Ethan Huang on 2021/1/13.
// Twitter: @ethanhuang13
import SwiftUI
struct VirtualKeyboard: View {
@azlen
azlen / bulletpaths.js
Last active August 16, 2024 03:55
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@import Photos;
[PHPhotoLibrary requestAuthorizationForAccessLevel:PHAccessLevelReadWrite handler:^(PHAuthorizationStatus status) {
NSLog(@"PHAuthorizationStatus: %ld", status);
PHFetchOptions *fetchOptions = [[PHFetchOptions alloc] init];
fetchOptions.includeHiddenAssets = YES;
fetchOptions.includeAllBurstAssets = YES;
PHFetchResult<PHAsset *> *result = [PHAsset fetchAssetsWithOptions:fetchOptions];