Skip to content

Instantly share code, notes, and snippets.

import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
void main() => runApp(MyApp());
const sampleText = '''
Flutter is an open-source UI software development kit created by Google.
It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia,[4] and the web from a single codebase.[5]
@hankchanocd
hankchanocd / netlify-function-sends-slack-notifications.js
Last active April 8, 2024 19:22
Netlify Function Sends Slack Notifications
/*
Since late 2020, Netlify has put up a pay wall on its built-in Slack notifications for CI/CD.
This gist shows you a workaround using the still-free Netlify's deploy webhook that triggers a Netlify Function calling Slack Incoming Webhook.
Steps:
1. Deploy this Netlify Function
2. Have the corresponding link pasted into Netlify's deploy webhook, i.e. https://example.com/.netlify/functions/<your-function>
3. In next deploy, Netlify will trigger the deploy webhook, which in turn calls your Slack Incoming Webhook
*/
@ppcano
ppcano / ember_reopen.js
Created May 20, 2014 17:02
hammerJS + ember integration
Em.View.reopen({
hammerOptions: null,
enableHammer: function() {
var gestures = ['drag', 'hold', 'release', 'swipe', 'tap', 'touch', 'transform'];
var options = this.get('hammerOptions');
if ( options ) {
gestures.forEach(function(gesture) {
if ( !options[gesture] ) {
@manufaktor
manufaktor / application.js
Last active December 23, 2015 08:19
Custom events with ember.js and hammer.js
App = Ember.Application.create({
customEvents: {
swipeLeft: 'swipeLeft',
swipeRight: 'swipeRight',
swipeLeftTwoFinger: 'swipeLeftTwoFinger',
swipeRightTwoFinger: 'swipeRightTwoFinger',
dragDown: 'dragDown',
dragUp: 'dragUp',
dragDownTwoFinger: 'dragDownTwoFinger',
dragUpTwoFinger: 'dragUpTwoFinger'
@alertor
alertor / jira-behing-nginx-ssl
Last active April 27, 2023 15:45
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)