Skip to content

Instantly share code, notes, and snippets.

tuxcanfly /
Created June 15, 2011 08:07
Generate python tags for vim
#! /usr/bin/env python
# ptags
# Create a tags file for Python programs, usable with vi.
# Tagged are:
# - functions (even inside other defs or classes)
# - classes
# - filenames
# Warns about files it cannot open.
lmcarreiro / .gitlab-ci.yml
Created June 11, 2018 13:36
GitLab CI .gitlab-ci.yml example
- build
- test
- deploy
# from
prokizzle / ExampleComponent.js
Last active July 14, 2021 00:55
useFeatureFlag Example
import React from 'react';
import useFeatureFlag from './useFeatureFlag';
import RecommendationsComponent from './Recommendations.js';
const {
DecoratedComponent: Recommendations,
featureEnabled: recommendationsFeatureEnabled,
} = useFeatureFlag({
Component: RecommendationsComponent,
ycherniavskyi / main.dart
Created December 28, 2019 15:25
Displaying notification badge on BottomNavigationBar's Icon
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
azenla / DartVMOptions.txt
Created December 14, 2014 21:30
Dart VM Options
[kaendfinger@localhost Dart]$ dart --help -v
Usage: dart [<vm-flags>] <dart-script-file> [<dart-options>]
Executes the Dart script passed as <dart-script-file>.
Supported options:
--checked or -c
Insert runtime type checks and enable assertions (checked mode).
--help or -h
Display this message (add -v or --verbose for information about
patrickkunka / configuration-1.js
Last active November 17, 2022 02:15
Configuration Patterns
* Configuration #1: Basic Configuration Class
* A basic example utilising a sealed instance of a configuration
* class, with user-provided options merged in upon instantation
* of the implementation.
class Config {
constructor() {
RobertSzkutak /
Created October 30, 2011 21:15
Echo, a simple IRC bot written in Python 3
#!/usr/bin/env python3
# Copyright (C) 2011 : Robert L Szkutak II -
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
psobot /
Created April 14, 2012 19:34
Asynchronous MP3 encoding in Python
from Queue import Queue
import subprocess
import threading
import traceback
import logging
import time
log = logging.getLogger(__name__)
Fade IN/OUT some text..
import sys
import time
import pygame
## Show some text fade in/out
nathanborror / instructions.txt
Last active May 17, 2023 00:55
Example Kubernetes setup with Postgres and two Services for serving an API and a static site using Ingress. Also have a CronJob example for kicks.
*** Cluster Setup for Google Container Engine ***
0/ Install and configure local gcloud and kubectl:
> gcloud components install kubectl
1/ Configure Google Cloud account:
> gcloud config set account YOUR_EMAIL_ADDRESS
> gcloud config set project YOUR_PROJECT_ID
> gcloud config set compute/zone us-west1-a
> gcloud config set container/cluster example