Skip to content

Instantly share code, notes, and snippets.

View kbshl's full-sized avatar

Konstantin Büschel kbshl

  • Marburg, Hessen, Deutschland
  • 20:45 (UTC +02:00)
  • X @iskostja
View GitHub Profile
@vijaysingh-axway
vijaysingh-axway / app.js
Last active April 3, 2020 16:27
app.js file having test cases of WebView
var items =
[
{
title : 'Webview events (beforeload, load, progress, redirect)',
message : 'In log it should print the values',
functionName : Test0
},
{
title : 'Webview events (error)',
message : 'In log it should print the error.',
@kamermanpr
kamermanpr / install-xcodeCLT-homebrew-git.md
Last active November 9, 2023 17:50
Install Xcode Command Line Tools, Homebrew, and Git on macOS

Install Xcode command line tools, Homebrew, and Git on macOS

Install the following apps on your mac running macOS:

  1. (standalone) Xcode Command Line Tools
  2. Homebrew
  3. Git

Modified from: https://www.moncefbelyamani.com

@dieffrei
dieffrei / Charset.cls
Created June 5, 2018 19:03 — forked from choose0or7/Charset.cls
Salesforce Force.com Apex: encode and decode string to / from binary characters in charset
public abstract class Charset {
/**
* Convenience method that encodes a string into bytes in charset.
* <p>
* @param input string of Unicode characters
* @param charset name according to http://www.iana.org/assignments/character-sets/character-sets.xhtml
* @return binary characters in charset
*/
public static Blob encode(final String input, final String charset) {
@rgvaldovino
rgvaldovino / unlocked_package_from_existing_code.MD
Last active August 3, 2023 14:52
Steps to create a sfdx unlocked package from existing project

Assumptions

  1. Your project does not have any dependency on external metadata (unless that dependency is another package)
  2. All your unit tests are passing
  3. Enabled Packaging 2 feature is enabled in your Dev Hub org (Production Org)
  4. You have permissions to create scratch orgs

Steps

Clone project repo

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

@adamtarmstrong
adamtarmstrong / appc_reste_sqlite_usage.js
Last active April 11, 2018 08:55
AppC: Using RESTe + local sqlite DB
//alloy.js
require("sqlite_reste_config");
var localDB = require('sqlite_db');
localDB.initDB();
//sqlite_reste_config.js
Alloy.Globals.reste = require("reste");
@joseluisq
joseluisq / stash_dropped.md
Last active May 23, 2024 14:45
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@SquirrelMobile
SquirrelMobile / alloy.js
Created January 30, 2018 12:05
Upload large video from Axway Titanium mobile application (iOS / Android) and save the video with PHP script
//Download and install widget loader : https://github.com/FokkeZB/nl.fokkezb.loading
Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");
@jpriebe
jpriebe / NestedScrollViewManager.js
Last active August 15, 2021 13:23
Appcelerator Titanium code for managing scrollviews inside of scrollviews
function NestedScrollViewManager (parent_view)
{
// Appcelerator Titanium code for managing scrollviews inside of scrollviews (not true Android
// NestedScrollViews, but just a horizontal scrollview inside of a vertical scrollview).
//
// If you want to put a horizontal scrollview inside a vertical scrollview (like the Netflix app UI),
// it seems to work reasonably well on iOS. But on android, the user experience is very janky.
// Unless the user's drag movements are nearly exactly horizontal, there will be some movement of
// the parent scrollview, and then it becomes very difficult to scroll the child view. Flinging is
// almost impossible.

If you are like me you find yourself cloning a repo, making some proposed changes and then deciding to later contributing back using the GitHub Flow convention. Below is a set of instructions I've developed for myself on how to deal with this scenario and an explanation of why it matters based on jagregory's gist.

To follow GitHub flow you should really have created a fork initially as a public representation of the forked repository and the clone that instead. My understanding is that the typical setup would have your local repository pointing to your fork as origin and the original forked repository as upstream so that you can use these keywords in other git commands.

  1. Clone some repo (you've probably already done this step).

    git clone git@github...some-repo.git