Skip to content

Instantly share code, notes, and snippets.

View meerestier's full-sized avatar
🎯
Focusing

Lars Schulz meerestier

🎯
Focusing
View GitHub Profile
@jbe2277
jbe2277 / OptimizeSqlFile.cs
Created May 4, 2017 20:38
Convert SQL Compact Edition database file to SQLite database file
// === Convert SQL Compact Edition database file to SQLite database file ===
// Dump SQL Compact Edition data to SQLite compatible SQL file
// - Command line tools: https://github.com/ErikEJ/SqlCeToolbox/wiki/Command-line-tools
// - ExportSQLCE40.exe "Data Source=D:\Northwind.sdf;" Northwind.sql sqlite
// The SQL file created by the SqlCeToolbox contains GUID data as text.
// - Connection string with GUID as text: https://www.connectionstrings.com/sqlite/
// Data Source=c:\mydb.db;Version=3;BinaryGUID=False;
// - Recommended is to store GUID data as binary instead of text (requires less space)

When I was a beginner…

This is a little exercise to try remember the things I struggled with, when I got started with web development. It's too easy to forget about those things after years in business. I think it's super important to keep the ability to put yourself back into the position of a beginner from time to time in order to not overcomplicate your own work and to not throw the typical "just" and "simply" sentences at other people, who get started.

The following list is not complete or very detailed. It's really all about writing down some memories quickly. Feel free to follow this experiment for yourself if you think it's useful.

HTML

  • Breaks. Why the hell doesn't text wrap in the browser when I add a line break to the source code?
  • Paths: I absolutely struggled with the basic concept of absolute and relative paths and why stuff doesn't get loaded correctly when I messed paths up in URLs.
@helderco
helderco / db-open
Created October 6, 2015 14:51
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
@adammorris
adammorris / JiraOmniFocus.py
Created April 10, 2015 21:34
Example snippet on how to sync from JIRA to OmniFocus.
"""
Example snippet on how to sync from JIRA to omnifocus.
The main function is OmniFocus.sync_jira_to_omnifocus().
OmniFocus.process_jira_data() is customized to filter projects based on my own needs and will need updating.
"""
from applescript import AppleScript, ScriptError
from datetime import datetime
from json import JSONDecoder
from logging import getLogger
@bmcbride
bmcbride / pdfmaps-shapefile.sh
Last active October 28, 2016 13:25
Bash script that uses GDAL/OGR to convert PDF Maps exported KML or KMZ Placemarks, Tracks, and Lines to shapefiles. Modify as needed for additional formats or custom attributes.
#!/bin/bash
echo "File type (kmz or kml):"
read TYPE
echo "Enter the filename (without the .kmz or .kml extension) to process:"
read FILENAME
# Unzip KMZ file
if [[ $TYPE = "kmz" ]]; then
Unzip "$FILENAME.kmz"
@ttscoff
ttscoff / tagfiler.rb
Last active March 22, 2025 09:34
Moves files to folders based on special tags in OS X Mavericks
#!/usr/bin/env ruby
# encoding: utf-8
# tag primary folders =Tagname
# target them with #Tagname
# tag subfolders with @nickname
# target them with :nickname
# if no tagged folder exists but there's a matching folder name, that's used
# otherwise it will create folders based on :tags
# :tags can be strung together :bt:Drafts:testing for nesting
# Only one #Tag and one :path should exist in a file's tags
@ttscoff
ttscoff / planter.rb
Created September 22, 2012 17:57
Create directory trees from indented text input
#!/usr/bin/ruby
=begin
Planter v1.3
Brett Terpstra 2013
ruby script to create a directory structure from indented data.
Three ways to use it:
- Pipe indented (tabs or 2 spaces) text to the script
- e.g. `cat "mytemplate" | planter.rb
- Create template.tpl files in ~/.planter and call them by their base name
@beh
beh / gist:3549933
Created August 31, 2012 07:40
Add bookmark to pinbord.in with predefined tag, without user intervention
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));
// Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto!
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@cameronmcefee
cameronmcefee / gist:2641743
Created May 9, 2012 04:14
Font Configuration File
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"expert","formats":["ttf","woff","eot","svg"],"tt_instructor":"default","options_subset":"advanced","subset_custom":"","subset_custom_range":"f000-f073,f200-f273","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"}