Skip to content

Instantly share code, notes, and snippets.

Avatar

Ruslan Leshchenko leshchenko

View GitHub Profile
@b-cancel
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{
@override
_BackButtonOverrideDemoWidgetState createState() => new _BackButtonOverrideDemoWidgetState();
}
@AliSoftware
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
danielbierwirth / TCPTestClient.cs
Last active Sep 19, 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
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
gunjanpatel / revert-a-commit.md
Last active Sep 11, 2020
Git HowTo: revert a commit already pushed to a remote repository
View revert-a-commit.md

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.