Skip to content

Instantly share code, notes, and snippets.

View tinacious's full-sized avatar
👩‍💻

Tina Holly tinacious

👩‍💻
View GitHub Profile
class InstantTaskExecutorExtension : BeforeEachCallback, AfterEachCallback {
override fun beforeEach(context: ExtensionContext?) {
ArchTaskExecutor.getInstance()
.setDelegate(object : TaskExecutor() {
override fun executeOnDiskIO(runnable: Runnable) = runnable.run()
override fun postToMainThread(runnable: Runnable) = runnable.run()
override fun isMainThread(): Boolean = true
import './style.scss'
import React, { PropTypes } from 'react'
export default class {{ componentName }} extends React.Component {
static propTypes = {
};
static defaultProps = {
};
@davidkpiano
davidkpiano / SassMeister-input.scss
Last active February 12, 2022 02:29
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
@function math-pow($number, $exp) {
@if (round($exp) != $exp) {
@return math-exp($exp * math-ln($number));
}
@jewelzqiu
jewelzqiu / CropBitmapToCircle.java
Last active December 13, 2023 01:43
Crop a bitmap to circle in Android
public static Bitmap getCircledBitmap(Bitmap bitmap) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, bitmap.getWidth() / 2, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
@leejsinclair
leejsinclair / protractor.conf.js
Last active August 19, 2018 06:25
Running protractor tests on codeship #testing #browser #selenium
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
// 'browserName': 'internet explorer', - special installation needed
// 'version':'10',
'browserName': 'chrome',
//'browserName': 'firefox'
@christophermlne
christophermlne / error_reporting.php
Created May 23, 2013 18:31
Enable php error reporting. Overrides server .ini settings
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
@balupton
balupton / docpad.coffee
Last active July 27, 2016 10:40
DocPad: Automatically set custom Meta Data for items in a Collection
# Define our Configuration
docpadConfig =
# Define our own Collections
collections:
# Posts
# Anything outputted to the posts directory can be considered a post
# Sort the posts by newest first
# And set their layout to `post` automatically if it isn't already set
@jehiah
jehiah / git-branch-status
Last active March 21, 2024 12:39
show git ahead/behind info for branches
moved to github --> https://github.com/bill-auger/git-branch-status/