A Pen by Laith Serhan on CodePen.
This is What Actually Happens Every Time Your Computer Rotates a Photo (calculator)
Original Project: https://gist.github.com/laithserhan/b76baeccd2269965217b081d72bb75ab
Source: https://petapixel.com/2017/04/05/actually-happens-every-time-computer-rotates-photo/
A Pen by Laith Serhan on CodePen.
| http://apassant.net/2012/01/16/timeout-for-html5-localstorage/ | |
| var hours = 24; // Reset when storage is more than 24hours | |
| var now = new Date().getTime(); | |
| var setupTime = localStorage.getItem('setupTime'); | |
| if (setupTime == null) { | |
| localStorage.setItem('setupTime', now) | |
| } else { | |
| if(now-setupTime > hours*60*60*1000) { | |
| localStorage.clear() |
| /* == Montserrat Font Family Styles == */ | |
| /* @group Montserrat | |
| -------------------------------------------------------------- */ | |
| /* = Weights Montserrat | |
| -------------------------------------------------------------- */ | |
| .thin { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>MiniCodepenClone</title> | |
| <style> | |
| body,textarea,iframe{ margin:0; box-sizing:border-box; } | |
| textarea,iframe { width:100%; height:50vh; float:left; } | |
| textarea { color:#eee; background:#111; font-family:monospace; font-size:11pt; line-height:1.4; width:33.33%; } | |
| #shareBtn { position:absolute; bottom:0; left:0; } |
| <!DOCTYPE html> | |
| <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <style> | |
| body { | |
| background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA |
| // Simple script that exports a users "Saved For Later" list out of Feedly | |
| // as a JSON string. | |
| // | |
| // This was intended for use in the Google Chrome's "Inspector" tool so your | |
| // mileage may vary if used in other contexts. | |
| // | |
| // Format of JSON is as follows: | |
| // [ | |
| // { | |
| // title: "Title", |
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
- preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
- actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location
NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |