Skip to content

Instantly share code, notes, and snippets.

View thorstenfriesen's full-sized avatar
🚀
wambo

Thorsten Friesen thorstenfriesen

🚀
wambo
View GitHub Profile
@click0
click0 / random-ipv6-address-generator.sh
Created April 24, 2011 17:48
Random generator ipv6 addresses within your ipv6 network prefix.
#Random generator ipv6 addresses within your ipv6 network prefix.
#!/usr/local/bin/bash
# Copyright
# Vladislav V. Prodan
# universite@ukr.net
# 2011
array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )
@electricg
electricg / fiddle.html
Created April 11, 2012 13:53
Geolocation and Flickr photos taken nearby - jQuery plugin
<figure class="flickr">
<figcaption></figcaption>
</figure>
@hightemp
hightemp / gist:2387916
Created April 14, 2012 21:16 — forked from borriglione/gist:2237588
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@arosenhagen
arosenhagen / magento-code-snippets.md
Last active April 8, 2024 09:21
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@molotovbliss
molotovbliss / gist:2562551
Last active September 7, 2022 20:18 — forked from davidalexander/gist:1086455
Magento Snippets

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@solkennedy
solkennedy / ship-api-php-example.php
Created August 6, 2012 18:46
Ship API PHP Example
<?
// Upload image from the filesystem
$ch = curl_init();
$request = array('appkey'=>'YOUR_APPKEY_HERE', 'photo'=>'@/path/to/image.jpg');
curl_setopt($ch, CURLOPT_URL, 'https://snapi.sincerely.com/shiplib/upload');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
@pamelafox
pamelafox / view.html
Created August 21, 2012 14:30
Google Maps AutoComplete for Profile Location Field
<div class="control-group">
<label class="control-label">Location</label>
<div class="controls">
<input name="location" type="text" placeholder="City, State, Country" value="">
<input name="location_city" type="hidden" value="">
<input name="location_state" type="hidden" value="">
<input name="location_country" type="hidden" value="">
<input name="location_lat" type="hidden">
<input name="location_lng" type="hidden">
</div>
@zhouming
zhouming / MY_Session.php
Created September 8, 2012 05:51
Use redis in Codeigniter Session.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Session extends CI_Session{
private $sess_use_redis = TRUE;
private $redis = '';
public function __construct($params = array()) {
//parent::__construct();
$this->CI =& get_instance();
@DaRaFF
DaRaFF / ubuntu-php-development-environment.md
Last active October 13, 2023 00:16
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@ceckoslab
ceckoslab / gist:4503260
Created January 10, 2013 16:09
Workaround to unbind the event listeners for the agreement checkboxes
<script type="text/javascript">
//<![CDATA[
// submit buttons are not needed when submitting with ajax
$('review_submit').hide();
if ($('update_shipping_method_submit')) {
$('update_shipping_method_submit').hide();
}
<?php if ($this->getUseAjax()):?>
OrderReviewController.prototype._submitOrder = function() {