Skip to content

Instantly share code, notes, and snippets.

View fredmontet's full-sized avatar
👋
Hi!

Frédéric Montet fredmontet

👋
Hi!
View GitHub Profile
@fredmontet
fredmontet / github-to-bitbucket
Created December 9, 2017 15:14 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v

Keybase proof

I hereby claim:

  • I am fredmontet on github.
  • I am fredmontet (https://keybase.io/fredmontet) on keybase.
  • I have a public key whose fingerprint is 8CE9 85B5 8A00 60C5 1EAF ED21 9AC1 D61F 377E 4D44

To claim this, I am signing this object:

@fredmontet
fredmontet / mediaQueries.css
Last active August 29, 2015 14:10
Media queries
/* Media queries
-------------------------------------------------- */
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
body{
width:90%;
}
}
@fredmontet
fredmontet / JSON key sorter
Last active August 29, 2015 14:05
JSON sorter by one of the value of its keys
function objectByKey(data, keyToSort){
var objectByKey = new Object();
objectByKey[keyToSort] = new Object();
$.each(data, function(i, item){
var currentKeyToSort = item[keyToSort];
if(i == 0){
objectByKey[keyToSort][currentKeyToSort] = [];
objectByKey[keyToSort][currentKeyToSort].push(item);
}else{
var length = objectLength(objectByKey[keyToSort]);
@fredmontet
fredmontet / PHP | complete var_dump
Created July 26, 2014 23:58
PHP | complete var_dump
ini_set('xdebug.var_display_max_depth', 5);
ini_set('xdebug.var_display_max_children', 256);
ini_set('xdebug.var_display_max_data', 1024);
var_dump($var);
@fredmontet
fredmontet / Useful doctrine 2 commands
Last active August 29, 2015 14:04
Useful doctrine 2 commands
app/console doctrine:schema:update --force
@fredmontet
fredmontet / new column in MySQL table with Doctrine
Created July 26, 2014 14:57
Add a column to an existing table in Symfony 2.3 with Doctrine 2.3 and MySQL
URL: http://stackoverflow.com/questions/14941358/add-a-column-to-an-existing-entity-in-symfony
Download the Doctrine Migrations package (http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html).
modify the class by:
Acme\MyBundle\Entity\Customer and add the property you want:
Acme\MyBundle\Entity\Customer