Source: http://www.syahzul.com/2016/04/06/how-to-install-oci8-on-ubuntu-14-04-and-php-5-6/
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 Tests\Traits; | |
| use KushyApi\User; | |
| trait AttachJwtToken | |
| { | |
| /** | |
| * @var 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
| version: "3" | |
| networks: | |
| kong-net: | |
| driver: bridge | |
| services: | |
| ####################################### | |
| # Postgres: The database used by Kong |
This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
- Domain filtering
- Referrer filtering
- Embed buster
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 slugify(string) { | |
| const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;' | |
| const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------' | |
| const p = new RegExp(a.split('').join('|'), 'g') | |
| return string.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters | |
| .replace(/&/g, '-and-') // Replace & with 'and' | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word characters |
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 Tests\Concerns; | |
| use App\Models\User; | |
| use Tymon\JWTAuth\Facades\JWTAuth; | |
| trait AttachJwtToken | |
| { | |
| /** |
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 puppeteer = require('puppeteer'); | |
| const cheerio = require('cheerio'); | |
| async function run() { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| await page.goto('https://news.ycombinator.com'); | |
| let content = await page.content(); | |
| var $ = cheerio.load(content); |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = '2' | |
| @script = <<SCRIPT | |
| # Variables | |
| db_host=127.0.0.1 | |
| root_passwd=sat | |
| db_name=uprojectdb |
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 | |
| # This is a modification of gitlab-gc.sh script created by Peter Bábics (pbabics/gitlab-gc.sh) | |
| # Improvements | |
| # - Searching in all BASE_PATH, not fixing the search to a depth of 2 | |
| # - Directories without valid tags or revisions directories won't be processed (to avoid unexpected issues) | |
| # - Logging in case there's nothing to delete | |
| # - running registry-garbage-collect only when something has been deleted |
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
| # Assumming we have 3 nodes | |
| NODE1=10.0.1.1 | |
| NODE2=10.0.1.2 | |
| NODE3=10.0.1.3 | |
| # Configure the server | |
| ssh root@NODE1 apt-get install -y glusterfs-server | |
| ssh root@NODE2 apt-get install -y glusterfs-server | |
| ssh root@NODE3 apt-get install -y glusterfs-server | |
| ssh root@NODE1 gluster peer probe NODE2 |