Skip to content

Instantly share code, notes, and snippets.

View lordlycastle's full-sized avatar
🤙
Let it Fly!

lordlycastle

🤙
Let it Fly!
View GitHub Profile
@nicolamontecchio
nicolamontecchio / mp3towav
Created January 19, 2011 18:28
convert an mp3 to wav using lame -- useful for converting whole directories
#!/usr/bin/env python
import os
import optparse
def processfile(fi, fo) :
print 'lame --decode --quiet %s %s' % (fi,fo)
if __name__ == '__main__':
# parse options
parser = optparse.OptionParser()
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 21, 2024 20:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kadrach
kadrach / gist:6228314
Created August 14, 2013 05:42
Enabling texdoc: Texlive/BasicTeX
Found here: http://macosx-tex.576846.n2.nabble.com/BasicTeX-and-documentation-td7579224.html
Problem: BasicTex does not come with texdoc installed, and does not build docs by default
1. Install texdoc
> tlmgr install texdoc
2. Enable automatic build of documentation, which is disabled (default) for BasicTeX tlmgr.
> tlmgr option docfiles 1
@kaloprominat
kaloprominat / macos: xcode preference pane debug settings
Created October 10, 2013 20:23
macos: xcode preference pane debug settings
Debug a Preference Pane with Xcode 4
Jun 13, 2011
Some time ago I did a post to show how to debug a Preference Pane with Xcode, but the tip was for Xcode 3, and now with Xcode 4 it has changed a bit.
But yesterday Scott Lahteine posted a comment to explain how to do it, so here is the new method for Xcode 4.
• In the product menu choose Edit Scheme...
• Go to the Run section and in the Executable field choose System Preferences.app
@weakish
weakish / code.md
Last active April 17, 2023 13:15
The Six Most Common Species Of #Code #java #fun
@erickoledadevrel
erickoledadevrel / SendDocument.js
Last active November 30, 2022 12:57
Send a Google Doc in an email using Apps Script
/**
* Sends an email using the contents of a Google Document as the body.
*/
function sendDocument(documentId, recipient, subject) {
var html = convertToHtml(documentId);
html = inlineCss(html);
GmailApp.sendEmail(recipient, subject, null, {
htmlBody: html
});
}
@flyhigher139
flyhigher139 / List of awesome list.md
Last active March 16, 2021 14:49
List of awesome list

下面是一堆awesome-*列表轮子,想看干货的童靴可以随意打开一个轮子:

  • Awesome - A curated list of awesome lists
  • awesome-all – A curated list of awesome lists of awesome frameworks, libraries and software
  • awesome-awesome by @emijrp – A curated list of awesome curated lists of many topics.
  • awesome-awesome by @erichs – A curated list of awesome curated lists! Inspired by inspiration.
  • awesome-awesome by @oyvindrobertsen – A curated list of curated lists of libraries, resources and shiny things for various languages.
  • awesome-awesomeness – A curated list of awesome awesomeness
  • awesome-awesomes – Awesome collection of awesome lists of libraries, tools, frameworks and software for any programming language
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@erickoledadevrel
erickoledadevrel / Code.gs
Created February 19, 2016 14:38
Create a Google Calendar event with an attachment in Apps Script
function createEventWithAttachment() {
var driveFileId = '...';
var file = DriveApp.getFileById(driveFileId);
var event = {
summary: 'Test Event with Attachments',
description: 'Woot!',
attachments: [{
fileId: driveFileId,
fileUrl: file.getUrl(),
mimeType: file.getMimeType(),