Skip to content

Instantly share code, notes, and snippets.

View christianjunk's full-sized avatar

Christian Junk christianjunk

View GitHub Profile
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |
@christianjunk
christianjunk / gist:5791842
Last active July 18, 2016 15:18 — forked from andyyou/gist:3052671
Winforms Controls Abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
/// <summary>
/// Non-Generic BaseForm. Provides functionality for retrieving the controller.
/// </summary>
public class BaseForm : Form
{
/// <summary>
/// Gets the controller for the given type.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
@christianjunk
christianjunk / 0_reuse_code.js
Created June 23, 2016 10:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@christianjunk
christianjunk / readinglist.py
Last active August 30, 2018 15:02 — forked from mpraglowski/readinglist.py
Export Safari Reading List bookmarks to pinboard
#!/usr/bin/env python
"""
forked from http://alexwlchan.net/2015/11/export-urls-from-safari-reading-list/
Requires Python 3.
"""
import os
import plistlib
INPUT_FILE = os.path.join(os.environ['HOME'], 'Library/Safari/Bookmarks.plist')
@christianjunk
christianjunk / github-to-bitbucket
Last active May 22, 2019 12:33 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@christianjunk
christianjunk / post-receive
Created April 21, 2020 15:03 — forked from fettlaus/post-receive
Jekyll Git-Auto-Publisher. Werte ersetzen und im Server-Repo in Verzeichnis $repository/.git/hooks/post-receive einfügen.
#!/bin/sh
# Die folgende Variable speichert den Pfad zum Repository um das es geht.
# Hier meinprojekt.git mit dem Namen Deines Repos ersetzen und ggfs.
# den Pfad zum Repo
GIT_REPO=$HOME/git/meinprojekt.git
# Die folgende Variable speichert den Pfad zum tmp Ordner in dem dann der Jekyll
# Befehl ausgeführt wird um die deine Seite in den Webroot zu befördern.
# Hier wieder "meinprojekt" mit dem Namen des Repos ersetzen ohne ".git" am Schluss.
TMP_GIT_CLONE=$HOME/tmp/meinprojekt
@christianjunk
christianjunk / globalmaptiles.py
Created August 8, 2021 12:58 — forked from maptiler/globalmaptiles.py
globalmaptiles.py
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
@christianjunk
christianjunk / obsidian-web-clipper-yaml.js
Last active January 5, 2022 08:44 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace TestConsole
{
// From https://stackoverflow.com/a/41392145/4213397