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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 | |
#================================================== | |
# AdAway implementation in shell | |
#================================================== | |
# | |
TMP_WORK_PATH="/tmp/.AdAway" | |
count=0 | |
host_sources="https://hosts-file.net/ad_servers.txt | |
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext |
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 get_wck_select_by_slug($slug) { | |
global $wpdb; | |
$results = $wpdb->get_results( "select * from $wpdb->postmeta where meta_value = '".$slug."'", ARRAY_A ); | |
$post_id = $results[0]['post_id']; | |
$separator = explode('_', $results[0]['meta_key']); | |
$suffix = isset($separator[1]) ? '_'.$separator[1] : ''; | |
$options = explode(',', get_post_meta($post_id, 'options'.$suffix, true)); | |
$labels = explode(',', get_post_meta($post_id, 'labels'.$suffix, true)); | |
/* initialize var */ |
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/bash | |
# Copies certain kinds of known files and directories from a given Jenkins master directory | |
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em. | |
set -ex | |
if [ $# -ne 3 ]; then | |
echo usage: $0 jenkins_home git_repos_url git_repos_name | |
exit 1 | |
fi |
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 | |
/** | |
* Tracking package via cURL from www.dawnwing.co.za | |
* | |
* @author Kundan K Singh <[email protected]> | |
*/ | |
define('DOMAIN_REQUEST_URL', 'http://www.dawnwing.co.za/business-tools/online-parcel-tracking/'); | |
include_once 'simple_html_dom.php'; |
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 | |
public function sampleArrayPaginator(Request $request) { | |
$response = array(); | |
$page = ($request->has('page')) ? intval($request->page) : 1; | |
$size = ($request->has('size')) ? intval($request->size) : 10; | |
$collection = collect($response); | |
$total = $collection->count(); | |
return new LengthAwarePaginator( | |
array_values($collection->forPage($page, $size)->toArray()), | |
$collection->count(), |
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 App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class GoogleSheetController extends Controller | |
{ | |
protected $sheets; |
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
Show hidden characters
{ | |
"shell_cmd": "php-cs-fixer fix --rules=@Symfony,array_indentation --using-cache=false $file", | |
"file_regex": "php$" | |
} |
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
javascript: (function() { | |
var newSS, styles = '* { background: #282b2e ! important; color: #e0e2e4 !important } :link, :link * { color: #2868C7 !important } :visited, :visited * { color: #dddddd !important }'; | |
if (document.createStyleSheet) { | |
document.createStyleSheet("javascript:'" + styles + "'"); | |
} else { | |
newSS = document.createElement('link'); | |
newSS.rel = 'stylesheet'; | |
newSS.href = 'data:text/css,' + escape(styles); | |
document.getElementsByTagName("head")[0].appendChild(newSS); | |
} |
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
# Base Image | |
FROM php:7.4-fpm-alpine | |
# Update system packages | |
RUN apk update && apk upgrade | |
# Install required pacjages | |
RUN apk add --no-cache nano vim nginx composer supervisor npm git htop \ | |
bzip2-dev zlib-dev libpng icu-dev libxml2-dev \ | |
freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev gettext-dev \ |
OlderNewer