$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Instal php5.6 with phpbrew on ubuntu 18.04 | |
# Install all dependencies | |
sudo apt update | |
sudo apt install wget php build-essential libxml2-dev libxslt1-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libreadline-dev libssl-dev autoconf | |
wget https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
chmod +x phpbrew | |
mv phpbrew /usr/local/bin |
It sometimes happen you need change code on a machine from which you cannot push to the repo.
You’re ready to copy/paste what diff
outputs to your local working copy.
You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:
1. Generate the patch:
git diff > some-changes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
# run `sudo service procps start` or reboot. | |
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
# | |
# More information resources: | |
# -$ man inotify # manpage | |
# -$ man sysctl.conf # manpage | |
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Block Skype ads | |
127.0.0.1 *.msads.net | |
127.0.0.1 *.msecn.net | |
127.0.0.1 *.rad.msn.com | |
127.0.0.1 a.ads2.msads.net | |
127.0.0.1 ac3.msn.com | |
127.0.0.1 ad.doubleclick.net | |
127.0.0.1 adnexus.net | |
127.0.0.1 adnxs.com | |
127.0.0.1 ads1.msn.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main | |
{- Divide x by y, as long as there is a proof that y is non-zero. The | |
'auto' keyword on the 'p' argument means that when safe_div is called, | |
Idris will search for a proof. Either y will be statically known, in | |
which case this is easy, otherwise there must be a proof in the context. | |
'so : Bool -> Type' is a predicate on booleans which only holds if the | |
boolean is true. Essentially, we are making it a requirement in the type | |
that a necessary dynamic type is done before we call the function -} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout --orphan temp_master | |
git rm -rf . | |
git commit --allow-empty -m 'Make initial root commit' | |
git rebase --onto temp_master --root master | |
git branch -D temp_master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax "gitcommit" "COMMIT_EDITMSG$" | |
color white "#.*" | |
color green "#.(modified|deleted).*" | |
color yellow start="# Changes.*" end="# Changed.*" | |
color cyan start="# Untracked.*" end="diff" | |
color cyan start="# Untracked.*" end="$$" | |
color brightred "^deleted file mode .*" | |
color brightgreen "^\+.*" | |
color brightred "^-.*" | |
color brightyellow "^(diff|index|---|\+\+\+).*" |
NewerOlder