Skip to content

Instantly share code, notes, and snippets.

View JKetelaar's full-sized avatar
Loading...

Jeroen Ketelaar JKetelaar

Loading...
View GitHub Profile
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@antoinekociuba
antoinekociuba / tar_magento_media_folder.sh
Created August 3, 2014 12:57
Command to Tar Magento media folder, excluding unwanted files/folders. This command needs to be run on your magento installation root folder.
tar -zcvf var/backups/media_$(date +%d%m%Y).tar.gz --exclude-vcs --exclude='*cache*' --exclude='captcha' --exclude='wysiwyg/.thumbs' --exclude='tmp' --exclude='import' --exclude='export' --exclude='js' --exclude='js_secure' --exclude='css' --exclude='css_secure' media/
@lologhi
lologhi / 1.How to easily implement a REST API with oAuth2 presentation.md
Last active April 4, 2024 22:13
Symfony2 : How to easily implement a REST API with oAuth2 (for normal guys)

It's still a work in progress...

Intro

As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :

@roachhd
roachhd / README.md
Last active July 18, 2024 07:24
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@einfallstoll
einfallstoll / README.md
Created June 30, 2015 13:30
Reset Spotlight Location (Fix for OS X 10.11 El Capitan)

Installation for GUI Users

  1. Right click the file and choose information and choose to always open this file with Terminal.app

  2. Go to the Terminal.app and do something like this chmod 744 Reset Spotlight.sh

  3. There you go, you can now double click it so reset the Spotlight location

  4. Optional: Uncomment line for the useCount to prevent Spotlight to forget that you already used it

@subfuzion
subfuzion / curl.md
Last active July 18, 2024 17:12
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@JayWood
JayWood / wpcli-posts-generator.php
Created May 6, 2016 14:14
A robust random posts generator with support for multisite, taxonomies, term counts, post counts, post types, featured images, featured image types, and more.
<?php
if ( defined( 'WP_CLI' ) && WP_CLI ) {
class JW_Random_Posts extends WP_CLI_Command {
private $args, $assoc_args;
/**
* Generates a Random set of posts
*
@JKetelaar
JKetelaar / Test.java
Created June 16, 2016 18:14
Managing the OSRune loader and cracking their insane method to secure downloading their actual client
import com.osrune.Loader;
import com.osrune.b;
import com.osrune.c;
import com.osrune.f;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ProxiBlue
ProxiBlue / gist:dfc74f35721b57e96b560d898cb6bfeb
Last active May 5, 2017 13:41
a script i run on any db to make it local dev ready
#!/bin/bash
n98-magerun --scope-id=0 config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=0 config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/secure/base_skin_url {{base_url}}/skin
@olssonm
olssonm / macos-disable-resize
Last active June 8, 2024 18:02
Disable resizing of the macOS dock
defaults write com.apple.dock size-immutable -bool true; killall Dock