This file contains hidden or 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 | |
| // https://wiki.apache.org/solr/UpdateJSON | |
| $data = array( | |
| array( | |
| 'id' => $id, | |
| 'field' => array( | |
| 'set' => 'value', // set is keyword | |
| ) | |
| ) | |
| ); |
This file contains hidden or 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
| server { | |
| listen 80 | |
| server_name example | |
| location / { | |
| root /var/www/your/app; | |
| if (!-e $request_filename){ # handles page reload | |
| rewrite ^(.*)$ /views/index.html break; | |
| } | |
| index /views/index.html; | |
| } |
This file contains hidden or 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 Avdily; | |
| use Nette; | |
| class TemplateHelpers extends Nette\Object { | |
| /** @var string */ | |
| private $wwwDir; |
This file contains hidden or 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/bash | |
| # http://linuxaria.com/howto/using-opendkim-to-sign-postfix-mails-on-debian | |
| # | |
| # Note: | |
| # opendkim-genkey has been changed (-h sha256) | |
| redColor='\033[0;31m' | |
| greenColor='\033[0;32m' | |
| noColor='\033[0m' |
This file contains hidden or 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 | |
| # Init. script for phantomjs, based on Ubuntu 12.04 skeleton. | |
| # Author: Anthony Lapenna <lapenna.anthony@gmail.com> | |
| PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
| DESC="Phantomjs service" | |
| NAME=phantomjs | |
| DAEMON=/usr/bin/$NAME | |
| PIDFILE=/var/run/$NAME.pid | |
| SCRIPTNAME=/etc/init.d/$NAME |
This file contains hidden or 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/bash | |
| now=$(date +"%Y-%m-%d") | |
| mysqlUser="root" | |
| mysqlPass="xxx" | |
| server="user@server.com" | |
| log="./backup_sql.log" | |
This file contains hidden or 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 | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| /** | |
| * @ORM\Entity() | |
| * @ORM\Table(name="user") | |
| */ | |
| class User |
This file contains hidden or 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/bash | |
| youtube-dl --extract-audio --audio-format "mp3" --audio-quality 1 --batch-file "list.txt" |
This file contains hidden or 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
| function branfuck(code, input){ | |
| const output = []; | |
| const data = []; | |
| let dataPointer = 0; | |
| let inputPointer = 0; | |
| let inputArr = input.split('').map(i => i.codePointAt(0)) | |
| const chars = code.split(''); | |
| let codePointer = 0; | |
This file contains hidden or 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
| const portalComponent = wrapper.find(Portal).at(0); | |
| const portalInstance = portalComponent.instance(); | |
| const portalWrapper = new ReactWrapper(portalInstance.props.children); | |
| portalWrapper.find(...) |
OlderNewer