Skip to content

Instantly share code, notes, and snippets.

@qopqopqop
qopqopqop / highlighted_icon
Created December 27, 2018 00:41 — forked from yathit/highlighted_icon
Flutter animated icon
import 'dart:async';
import 'package:flutter/material.dart';
class HighLightedIcon extends StatefulWidget {
final IconData icon;
final double size;
final Color color;
HighLightedIcon(
#!/usr/bin/env bash
# OpenSSL requires the port number.
SERVER=$1
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
echo Obtaining cipher list from $(openssl version).
for cipher in ${ciphers[@]}
@qopqopqop
qopqopqop / bitbucket-pipelines.yml
Created December 28, 2017 01:28 — forked from mkorkmaz/bitbucket-pipelines.yml
Bitbucket pipeline example for PHP 7.1 + MongoDB + Memcached + Codeception
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1
pipelines:
default:
- step:
caches:
- composer
script:
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Cloudformation stack to manage permission to deploy a serverless service'
Parameters:
ServiceName:
Description: Name of the Service you want to deploy
Type: String
ServiceName2:
Description: Name of the 2nd Service you want to deploy
@qopqopqop
qopqopqop / gist:5f1a0fba47c42b9ad12bf006cbdac6aa
Created August 20, 2017 20:48 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@qopqopqop
qopqopqop / bitbucket-pipelines.yml
Created August 13, 2017 04:52 — forked from webbgeorge/bitbucket-pipelines.yml
Example bitbucket pipelines config for PHP project
image: phpunit/phpunit:4.6.10
pipelines:
default:
- step:
script:
- pecl install xdebug && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini
- composer --version
- composer install
- vendor/bin/phpunit --version
[{"name":"Bears","color":"Blue","position":{"x":177,"y":85},"modelclass":"Bear","increment":false,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"colid":"c218","name":"name","type":"string","length":"200","order":1,"defaultvalue":"","enumvalue":""},{"colid":"c219","name":"danger_level","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":""}],"relation":[{"extramethods":"","foreignkeys":"","name":"fish","relatedmodel":"Fish","relationtype":"hasOne","usenamespace":""},{"extramethods":"","foreignkeys":"","name":"trees","relatedmodel":"Trees","relationtype":"hasMany","usenamespace":""},{"extramethods":"","foreignkeys":"bear_id, picnic_id","name":"picnics","relatedmodel":"Picnics","relationtype":"belongsToMany","usenamespace":""}],"seeding":[]},{"name":"Fish","color":"Yellow","position":{"x":1063,"y":14},"modelclass":"Fish","increment":false,"timestamp":false,"softdelete":false,"column":[{"c
@qopqopqop
qopqopqop / functions.php
Created February 5, 2017 19:46 — forked from fardog/functions.php
A function for sending Wordpress Advanced Custom Fields (ACF) Repeater Field, Flexible Content Field, Gallery Field data with Thermal API.
<?php
function north_cast_api_data($content) {
if (is_numeric($content)) $content = intval($content);
else {
$unserialized_content = @unserialize($content);
// we got serialized content
if ($unserialized_content !== false) {
// make sure that integers are represented as such, instead of str
foreach ($unserialized_content as $fn => &$c) {
@qopqopqop
qopqopqop / ci_get_wp_posts.php
Created February 5, 2017 19:43 — forked from riyandika/ci_get_wp_posts.php
Get WordPress posts with CodeIgniter. A CodeIgniter Model Class to retrieve posts and images from your WordPress database.
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* @since May - 2016
* @author: Riyandika Andhi - twitter @riyandika_
* @see: https://gist.github.com/fernandoporazzi/6020733
*/
Class WP_Post extends CI_Model{
@qopqopqop
qopqopqop / codeigniter_get_wordpress_posts.php
Created February 5, 2017 19:42
Get WordPress posts with CodeIgniter. A CodeIgniter Model Class to retrieve posts and images from your WordPress database.
<?php
/**
* @since July - 2013
* @author: Fernando Porazzi - twitter @fernandoporazzi
* @see http://ellislab.com/codeigniter/user-guide/database/active_record.html
*/
/**
* Set the number of posts you want to retrieve from you WP database