Skip to content

Instantly share code, notes, and snippets.

View kristiyandobrev's full-sized avatar

Kristiyan Dobrev kristiyandobrev

View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@mrzmyr
mrzmyr / gist:977fc7d8bee58db9d96f
Last active September 10, 2020 10:04
Launching external maps applications (Ionic, Google Maps, Apple Maps) on Android and iOS
<!-- https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html -->
<a href="maps://?q=dallas" data-rel="external">iOS launch in apple maps</a>
<!-- https://developers.google.com/maps/documentation/ios/urlscheme -->
<a href="comgooglemaps://?q=dallas" data-rel="external">iOS launch in google maps</a>
<a href="geo://0,0?q=dallas" data-rel="external">Android launch in google maps</a>
@cuth
cuth / hyperterm-aliases.md
Last active November 8, 2021 07:08
Load websites, search Google or open local files; all within HyperTerm

HyperTerm aliases

HyperTerm is a terminal that is built with Electron. Electron is like building apps with a baked-in browser (Chromium). So what makes HyperTerm easily unique from other terminals is the ability to load websites right inside the terminal window.

To open a website in Hyperterm, just type the URL in the command line:

@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@tuliofaria
tuliofaria / index.js
Created December 22, 2017 23:09
Playing a video in Chromecast with NodeJS
const mdns = require('mdns')
const Client = require('castv2-client').Client
const DefaultMediaReceiver = require('castv2-client').DefaultMediaReceiver
const playMedia = host => {
const client = new Client()
client.connect(host, () => {
console.log('connected')
client.launch(DefaultMediaReceiver, (err, player) => {
@GeekTree0101
GeekTree0101 / ASVideoNode-Feed-Example.swift
Last active January 13, 2021 03:01
Simple Video Feed Performance Improvement Experiment
import AsyncDisplayKit
struct VideoProcessing {
private static let loadOperation: OperationQueue = {
let operationQueue = OperationQueue()
operationQueue.maxConcurrentOperationCount = 3
operationQueue.name = "com.VideoFeedController.VideoLoaderOperation"
operationQueue.qualityOfService = .utility
return operationQueue
}()
@cornr
cornr / UniversialLinkTest.swift
Last active December 25, 2023 04:01
UI testing openURL and universal links via iMessage
import XCTest
class UniversialLinktTest: XCTestCase {
var app: XCUIApplication!
override func setUp() {
super.setUp()
continueAfterFailure = false
app = XCUIApplication()
app.launch()
# To add assets to your application, add an assets section, like this:
assets:
- images/spotify_logo_banner_black.png
- images/spotify_logo_title.png
- images/spotify_logo_vertical_black.jpg
- images/spotify_logo.jpg
- images/spotify_smaller.png
- images/Spotify_logo_horizontal_black.jpg
# An image asset can refer to one or more resolution-specific "variants", see
@jamesmacfie
jamesmacfie / README.md
Created October 22, 2019 02:53
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.