Skip to content

Instantly share code, notes, and snippets.

@Geoffrey-T
Geoffrey-T / gitCheatSheet.sh
Created December 4, 2020 14:07
Git help kit
# Reset last commit (hard reset, without save changes)
git reset --head HEAD^
# Reset last commit and keep changes in unstages files
git reset --soft HEAD^
# Change original branch -> when you start your dev from the wront branch
git rebase --onto goodBranch wrongBranch # wrongBranch is your wrong started branch
# When you commit unneeded files and forgot to change your giignore file:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <printerFiscalReceipt>
            <beginFiscalReceipt operator="2"></beginFiscalReceipt>
            <setLogo index="" operator="2" location=""></setLogo>
            <printRecMessage font="1" operator="2" messageType="4" message=" "></printRecMessage>
            <printRecItem quantity="1" unitPrice="12.00" operator="52" justification="1" description="pizza" department="1"></printRecItem>
            <printRecItemAdjustment adjustmentType="0" operator="2" amount="12.00" description="Discount" department="1"></printRecItemAdjustment>
            <printRecMessage font="1" operator="2" messageType="4" message=" "></printRecMessage>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<printerCommands>
<directIO command="4001" data="1008201744" comment="Set printer date and time"></directIO>
<directIO command="4015" data="22001" comment="Center header and footer"></directIO>
<directIO command="4014" data="041" comment="Activate operators"></directIO>
<directIO command="4014" data="030" comment="Receipts Open Drawer"></directIO>
<directIO command="4014" data="260" comment="Auto Open Drawer"></directIO>
<directIO command="4014" data="500" comment="Subtotal Open Drawer"></directIO>
@Geoffrey-T
Geoffrey-T / logo.xml
Last active January 28, 2020 09:15
Epson logo XML
<?xml version="1.0" encoding="utf-8" ?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><printerCommand>
<setLogo location="1" index="1" graphicFormat="B" option="0">Qk1K1QEAAAAAAIoAAAB8AAAAyAAAAMgAAAABABgAAAAAAMDUAQASCwAAEgsAAAAAAAAAAAAAAAD/AAD/AAD/AAAAAAAA/0JHUnMAAAAAAAAAAFS4HvwAAAAAAAAAAGZmZvwAAAAAAAAAAMT1KP8AAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAA////////////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////AAAA//////////////////////////////////////////////
@Geoffrey-T
Geoffrey-T / cleanXcode.sh
Created October 5, 2017 09:20
[XCODE] Clean derived Data script
# Copy this function in your ~/.bashrc file.
# execute `source ~/.bashrc` or open a new terminal
cleanXcode () {
DIR=~/Library/Developer/Xcode/DerivedData/
cd $DIR
ls
rm -r -- "$DIR"*
}
@Geoffrey-T
Geoffrey-T / CreatePrivatePod.md
Last active April 18, 2018 13:01
Create Private Pod snippets

Create Pod

pod lib create YOUR_POD
git remote add origin your_repository_link
# Copyright (c) 2009 rupa deadwyler under the WTFPL license
# maintains a jump-list of the directories you actually use
#
# INSTALL:
# * put something like this in your .bashrc/.zshrc:
# . /path/to/z.sh
# * cd around for a while to build up the db
# * PROFIT!!
# * optionally:
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
### Aliases
# Open specified files in Sublime Text
# "s ." will open the current directory in Sublime
alias s='open -a "Sublime Text"'
# Color LS
colorflag="-G"
alias ls="command ls ${colorflag}"
alias l="ls -lF ${colorflag}" # all files, in long format
angular.module('myModule')
.directive('resizeImg', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var width = element.parent().width();
var maxHeight = attrs.height;
var newHeight, newWidth;