This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Oinm\ServiceBundle\DependencyInjection; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
use Symfony\Component\DependencyInjection\Loader; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\UserBundle\Model; | |
use FOS\UserBundle\Entity\UserManager as BaseUserManager; | |
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; | |
class UserManager extends BaseUserManager | |
{ | |
public function loadUserByUsername($username) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'http://www.example.com/a-large-file.zip'; | |
$path = '/path/to/a-large-file.zip'; | |
$fp = fopen($path, 'w'); | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_FILE, $fp); | |
$data = curl_exec($ch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Sbaam\Bundle\UtilsBundle\Command; | |
use Symfony\Component\Console\Command\Command, | |
Symfony\Component\Console\Input\InputArgument, | |
Symfony\Component\Console\Input\InputInterface, | |
Symfony\Component\Console\Input\InputOption, | |
Symfony\Component\Console\Output\OutputInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pw=`zenity --entry --hide-text --title="Encrypt document" --text="Insert key"`; | |
openssl enc -d -aes128 -base64 -pass "pass:$pw"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pw=`zenity --entry --hide-text --title="Encrypt document" --text="Insert key"`; | |
openssl enc -e -aes128 -base64 -pass "pass:$pw"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/init.d/dropbox | |
start() { | |
echo "Starting dropbox..." | |
start-stop-daemon -b -o -c dropbox -S -x /dropbox/.dropbox-dist/dropbox | |
} | |
stop() { | |
echo "Stopping dropbox..." | |
start-stop-daemon -o -c dropbox -K -x /dropbox/.dropbox-dist/dropbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function gen_uuid($len=8) { | |
$hex = md5("yourSaltHere" . uniqid("", true)); | |
$pack = pack('H*', $hex); | |
$tmp = base64_encode($pack); | |
$uid = preg_replace("#(*UTF8)[^A-Za-z0-9]#", "", $tmp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace LMammino\Generator; | |
class Uid | |
{ | |
/** | |
* @var string | |
*/ | |
protected $salt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "example/multicurl", | |
"description": "a test with various multi curl libraries", | |
"require": { | |
"kriswallsmith/buzz": "dev-master", | |
"rdlowrey/artax": "dev-master", | |
"jyggen/curl": "dev-master" | |
}, | |
"license": "MIT", | |
"authors": [ |
OlderNewer