Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
// ... | |
class AbstractInvoiceLineType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
// ... |
This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
$(document).ajaxComplete(function(event, XMLHttpRequest){ | |
var token = XMLHttpRequest.getResponseHeader('x-debug-token'), | |
protocol = window.location.protocol, | |
hostname = window.location.hostname; | |
if(token) { | |
$.get(protocol+'//'+hostname+'/_wdt/'+token, function(data){ |
fos_user: | |
db_driver: orm | |
firewall_name: main | |
user_class: App\Entity\User | |
service: | |
user_manager: app.user_manager | |
hwi_oauth: | |
firewall_name: main | |
fosub: |
Indicator Synapse is a Spotlight Alternative, developed by Tom Beckmann.
How to Install Indicator Synapse (Spotlight Alternative) on Ubuntu 14.04 LTS or Linux Mint 17 run this commands in terminal:
$ [sudo] add-apt-repository ppa:noobslab/apps
$ [sudo] apt-get update
$ [sudo] apt-get install indicator-synapse
<?php | |
function encrypt_mcrypt($msg, $key, $iv = null) { | |
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); | |
if (!$iv) { | |
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); | |
} | |
$pad = $iv_size - (strlen($msg) % $iv_size); | |
$msg .= str_repeat(chr($pad), $pad); | |
$encryptedMessage = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $msg, MCRYPT_MODE_CBC, $iv); | |
return base64_encode($iv . $encryptedMessage); |
App\Model\File: | |
type: entity | |
table: files | |
entityListeners: | |
App\Doctrine\EventListener\FileUploadListener: | |
prePersist: [upload] | |
preUpdate: [upload] | |
preRemove: [remove] | |
id: | |
id: |
The command line, in short…
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/
…and the options explained
#!/bin/sh | |
# chardetect orignial | |
IFS_BAK=$IFS | |
IFS=" | |
" | |
for line in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do | |
iconv -f Windows-1250 -t utf-8//IGNORE $line > $line.tmp |