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 | |
# https://github.com/Tunnelblick/Tunnelblick/issues/789 | |
echo-active-dns() { | |
echo Current DNS server: `scutil --dns | grep 'nameserver' | uniq | awk '{print \$3}'` | |
} | |
alias restart-dns="networksetup -setdnsservers Wi-Fi empty; echo-active-dns;" |
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 | |
class ExampleController extends Controller | |
{ | |
// GET /entities | |
public function index() {} | |
// GET /entities/:id | |
public function show($id) {} | |
// POST /entities |
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 | |
m.name AS 'Manufacturer', | |
p.id_product 'Product ID', | |
pl.name 'Product Name', | |
GROUP_CONCAT(DISTINCT(al.name) SEPARATOR ", ") AS 'Combination', | |
GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ",") AS 'Categories', | |
p.price 'Price', | |
pa.price 'Combination Price', | |
p.id_tax_rules_group 'VAT Group', | |
p.wholesale_price 'Wholesale Price', |
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 | |
# See: https://groups.google.com/forum/#!topic/gwdbeta/WzgS3Z6H-Xc | |
find -iname index.html -exec sed -i -e 's/<\/body>/<script data-exports-type="dclk-quick-preview">studio.Enabler.setRushSimulatedLocalEvents(true);<\/script><\/body>/g' {} \; |
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
echo QUIT | openssl s_client -connect localhost:8101 | sed -ne '/BEGIN CERT/,/END CERT/p' > my-cert | |
certutil certutil -d sql:~/.pki/nssdb -A -t "P,," -n my-cert -i my-cert |
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
for i in `aws dynamodb list-tables | jq .'TableNames[]' -r`; do aws dynamodb delete-table --table-name $i; done; |
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
docker exec container mongodump --archive > your_dump |
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
#!/usr/local/rvm/wrappers/ruby-2.1.1/ruby | |
# encoding: UTF-8 | |
require 'rss' | |
require 'open-uri' | |
require 'i18n' | |
I18n.backend.store_translations :hu, { | |
:date => { | |
:formats => { | |
:default => "%Y.%m.%d" |
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 | |
# Convert an OTF font into TTF an EOT formats. | |
otfFont="$1.otf" | |
ttfFont="$1.ttf" | |
fontforge -c ' | |
import fontforge | |
font = fontforge.open("'$ttfFont'") | |
font.generate("'$otfFont'") |
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
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
# POSSIBILITY OF SUCH DAMAGE. | |
# | |
import fontforge | |
import os | |
import re |
NewerOlder