Skip to content

Instantly share code, notes, and snippets.

View agungsijawir's full-sized avatar
😊
Slow but sure coming back to live

Agung Andika agungsijawir

😊
Slow but sure coming back to live
View GitHub Profile
@chabibnr
chabibnr / Yii_Library.php
Last active March 5, 2022 00:53
Library Yii2 for Codeigniter
<?php
define('YII_ENABLE_ERROR_HANDLER', false);
/**
* Class Yii_Library
* @package Libraries
*/
class Yii_Library
@petskratt
petskratt / .gitignore
Last active March 30, 2024 15:02
Group file change times by inode ctime
.Idea
.DS_Store
@nivv
nivv / PHP 7 - Installing imagick on Ubuntu 14.04.md
Last active November 28, 2021 11:38
Guide - Enable imagick on PHP7

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@lopezjurip
lopezjurip / README.md
Last active September 10, 2023 06:27
Write to NTFS on OSX Yosemite and El Capitan

OUTDATED, see comments below

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@Danack
Danack / batchStrace
Last active February 25, 2020 03:28
Strace all the PHP-FPM
#!/bin/bash
# Prevent strace from abbreviating arguments?
# You want the -s strsize option, which specifies the maximum length of a string to display (the default is 32).
# -etrace=!open means to trace every system call except open. In addition, the special values all and none have the obvious meanings.
#-etrace=!open
#-e trace=!write.
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active March 6, 2024 22:48 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@krakjoe
krakjoe / pthreads.md
Last active August 30, 2023 18:30
pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
@jamband
jamband / sample.php
Last active August 19, 2016 23:14
Yii Framework: example LIKE query.
<?php
$c = new CDbCriteria();
Hoge::model()->findAll($c);
// SELECT * FROM `hoge` `t`
$c = new CDbCriteria();
$c->addSearchCondition('t.fuga', null); // null, false, ''などは無視されるようです
Hoge::model()->findAll($c);