Skip to content

Instantly share code, notes, and snippets.

View Starou's full-sized avatar

Stanislas Guerra Starou

  • Slashdev s.a.r.l.
  • Pays de St-Malo
View GitHub Profile
@cezaraugusto
cezaraugusto / gpg_fix.txt
Last active November 7, 2024 16:39
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@bastien
bastien / CustomFlattenerPreset.jsx
Created December 6, 2011 11:49
Script generating custom PDF flattener export presets for InDesign
main();
function main(){
var myFlattenerPresetName = "MyCustomFlattenerPreset";
var myPDFExportPresetName = "MyPDFExport";
var tempFlattenerPreset = app.flattenerPresets.itemByName(myFlattenerPresetName);
if(tempFlattenerPreset != null){
tempFlattenerPreset.remove();
}
var flattenerlevel = FlattenerLevel.LOW;
@cnruby
cnruby / install ncurses on macosx
Created May 7, 2011 09:05
HOW TO INSTALL ncurses on MacOSX
$ curl -O ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz
$ tar -xzvf ncurses-5.9.tar.gz
$ cd ./ncurses-5.9
$ ./configure --prefix=/usr/local \
--without-cxx --without-cxx-binding --without-ada --without-progs --without-curses-h \
--with-shared --without-debug \
--enable-widec --enable-const --enable-ext-colors --enable-sigwinch --enable-wgetch-events \
&& make
$ sudo make install
# -*- coding: utf-8 -*-
"""
Example Usage
=============
>>> import datetime
>>> start = datetime.date(2009, 6, 21)
>>> g1 = daterange(start)