Skip to content

Instantly share code, notes, and snippets.

View jogboms's full-sized avatar
💙
Building Awesome w/ Dart & Flutter

Jeremiah Ogbomo jogboms

💙
Building Awesome w/ Dart & Flutter
View GitHub Profile
# encoding: utf-8
import sys
from glob import glob # glob will help us search for files based on their extension or filename.
from distutils.core import setup # distutils sends the data py2exe uses to know which file compile
import py2exe
data_files = [
# All the files that are not .py, .pyd or .pyc should be invoked so py2exe adds them to the compilation
("Microsoft.VC90.CRT",
glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*')), # Adds the file to the compilation folder because it may broke inside the compilation
/* Sleep Demo Serial
* -----------------
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up
* when new data is received in the serial port USART
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode
*
* Copyright (C) 2006 MacSimski 2006-12-30
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF
*
* With modifications from Ruben Laguna 2008-10-15
/* Sleep Demo Serial
* -----------------
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up
* when new data is received in the serial port USART
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode
*
* Copyright (C) 2006 MacSimski 2006-12-30
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF
*
* With modifications from Ruben Laguna 2008-10-15
/* Sleep Demo Serial
* -----------------
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up
* when new data is received in the serial port USART
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode
*
* Copyright (C) 2006 MacSimski 2006-12-30
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF
*
* With modifications from Ruben Laguna 2008-10-15
@jogboms
jogboms / introrx.md
Created September 4, 2016 05:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@jogboms
jogboms / sass-var-concat.scss
Created June 29, 2017 17:18 — forked from awestmoreland/sass-var-concat.scss
Concatenation of sass value+units. See also: http://stackoverflow.com/a/9862328
// Set sizes without units
$basefont: 20;
$total-width-px: 1169;
$column-width-px: 72;
// Concatenation of units by addition results in conversion to string. This is bad
$basefont-px: $basefont+'px'; // = "20px"
// Conversion to pixels using multiplication
$basefont-px: $basefont*1px; // = 20px;
@jogboms
jogboms / label-max-lines.directive.ts
Created July 21, 2017 09:45 — forked from m-abs/label-max-lines.directive.ts
Directive for NativeScript-angular, adding the property maxLines to Label
import { Directive, ElementRef, Input, OnInit, OnChanges } from '@angular/core';
import { Label } from 'ui/label';
@Directive({
selector: '[maxLines]',
})
export class LabelMaxLinesDirective implements OnInit, OnChanges {
@Input('maxLines') public maxLines: number = 1;
public get nativeView(): Label {
@jogboms
jogboms / image-cache.pipe.ts
Created July 21, 2017 09:47 — forked from m-abs/image-cache.pipe.ts
ImageCache pipe for NativeScript-Angular
import { Pipe, PipeTransform, NgZone } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { ImageSource, fromResource } from 'image-source';
import { Cache } from 'ui/image-cache';
import { isFileOrResourcePath, isDataURI } from 'utils/utils';
let cache = new Cache();
cache.placeholder = fromResource('placeholder');
@jogboms
jogboms / gist:84cf8708538e8da7b43d68ecbfbc91ff
Created October 25, 2017 19:09 — forked from segebee/gist:7dde9de8e70a207e6e19
Nigeria States and Local Government Areas JSON - codingsavvy.com
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung
@jogboms
jogboms / AndroidManifest.xml
Last active January 11, 2018 10:22 — forked from nilsmehlhorn/AndroidManifest.xml
Android push notifications with EddyVerbruggen/nativescript-plugin-firebase
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"