Skip to content

Instantly share code, notes, and snippets.


Ruslan Leshchenko leshchenko

View GitHub Profile
b-cancel / main.dart
Last active May 30, 2020
FLUTTER => Overriding Back Button in Flutter
View main.dart
import 'package:flutter/material.dart';
import 'dart:async';
void main() => runApp(new BackButtonOverrideDemoWidget());
class BackButtonOverrideDemoWidget extends StatefulWidget{
_BackButtonOverrideDemoWidgetState createState() => new _BackButtonOverrideDemoWidgetState();
AliSoftware / morphing.swift
Created Aug 3, 2017
A simple demo of doing some morphing using CAShapeLayer & UIBezierPath
View morphing.swift
import UIKit
import PlaygroundSupport
// Create a view to display the result in playground
let view = UIView(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
view.backgroundColor = .white
PlaygroundPage.current.liveView = view;
danielbierwirth / TCPTestClient.cs
Last active Oct 20, 2020
TCP Client-Server Connection Example | Unity | C# | Bidirectional communication sample: Client can connect to server; Client can send and receive messages: Server accepts clients; Server reads client messages; Server sends messages to client
View TCPTestClient.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
public class TCPTestClient : MonoBehaviour {
#region private members
fahied / MyWKWebVC.Swift
Created Jan 10, 2017
WKWebView controller example with progress bar
View MyWKWebVC.Swift
// MyWKWebVC.Swift
// Example
// Created by Fahied on 04/01/2017.
import Foundation
import UIKit
import WebKit
gunjanpatel /
Last active Oct 16, 2020
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

You can’t perform that action at this time.