Skip to content

Instantly share code, notes, and snippets.

View antoniofrignani's full-sized avatar
👨‍💻

Antonio Frignani antoniofrignani

👨‍💻
View GitHub Profile
@joeblau
joeblau / patatap.sh
Created March 26, 2014 18:52
Patatap Sounds Download Script
#!/bin/bash
array=( wipe veil prism-1 prism-2 prism-3 clay piston-1 piston-2 piston-3 flash-1 flash-2 flash-3 dotted-spiral suspension confetti timer ufo splits moon strike zig-zag squiggle bubbles corona pinwheel glimmer )
for i in "${array[@]}"
do
wget -nc "http://www.patatap.com/assets/A/$i.mp3" -P A/
wget -nc "http://www.patatap.com/assets/B/$i.mp3" -P B/
wget -nc "http://www.patatap.com/assets/C/$i.mp3" -P C/
wget -nc "http://www.patatap.com/assets/D/$i.mp3" -P D/
wget -nc "http://www.patatap.com/assets/E/$i.mp3" -P E/
@ludo237
ludo237 / .htaccess
Last active January 27, 2024 14:08
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
@msurguy
msurguy / DB.sql
Last active August 20, 2023 18:02
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@JeffreyWay
JeffreyWay / snippet.xml
Created September 13, 2012 20:23
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');