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
SELECT T.value FROM ( | |
SELECT DISTINCT TRIM(SUBSTRING_INDEX(SUBSTRING_INDEX(t.ingredients, ',', n.n), ',', -1)) value | |
FROM ProductsHaveMetadata t CROSS JOIN | |
( | |
SELECT a.N + b.N * 10 + 1 n | |
FROM | |
(SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) a | |
,(SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) b | |
ORDER BY n | |
) n |
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
csplit --digits=2 --prefix=table-nr- mydumpname.sql "/-- Table structure for table/+1" "{*}" |
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
import React from 'react'; | |
import 'whatwg-fetch'; // https://www.npmjs.com/package/whatwg-fetch | |
import asyncPoll from 'react-async-poll'; | |
import ReactDOM from "react-dom"; | |
const Status = props => { | |
let text = ''; | |
const {inProgress, isSuccessful, isFailed, stopPolling} = props; | |
console.log(props); |
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 | |
\UConverter::transcode('content', 'UTF-8', 'UTF-8') |
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
alias xphp='XDEBUG_CONFIG="idekey=x" php -dzend_extension=xdebug.so' |
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 | |
//read | |
$conn = $this->getMapper()->connection(); | |
$first = $this->getMapper()->first(); | |
$db = $conn->getWrappedConnection(); //pdo | |
$conn->beginTransaction(); | |
$stream = $db->pgsqlLOBOpen($first->getContent(), 'r'); | |
$i = 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
select pg_get_indexdef(idx.oid)||';' | |
from pg_index ind | |
join pg_class idx on idx.oid = ind.indexrelid | |
join pg_class tbl on tbl.oid = ind.indrelid | |
left join pg_namespace ns on ns.oid = tbl.relnamespace | |
where tbl.relname = 'mytablename' | |
and ns.nspname = 'public'; |
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
notify{"The string value is: ${string}": } |
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
set $target_path /vagrant/public; | |
if (!-d $target_path) { | |
set $target_path /vagrant/public; | |
} | |
root $target_path; | |
location /css/ { | |
root /vagrant; | |
try_files /ecommerce/config/assets/$uri /ecommerce/config/assets/$uri/ /public/$uri /public/$uri/ @rewrite; |
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
alias pbcopy='xclip -selection clipboard' | |
alias pbpaste='xclip -selection clipboard -o' | |
git flow feature start "$(pbpaste | tr -c '[:alnum:]' '-' | tr -s '-' '-')" |
NewerOlder