Skip to content

Instantly share code, notes, and snippets.

View tmosest's full-sized avatar

Tyler Moses tmosest

View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active January 29, 2024 01:17
Uploading Files From Local To Google Drive by Python without Quickstart

Uploading Files From Local To Google Drive by Python without Quickstart

This is a sample script for uploading files from local PC to Google Drive using Python. In this sample, Quickstart is not used. So when you use this script, please retrieve access token.

Curl sample :

curl -X POST \
    -H "Authorization: Bearer ### access token ###" \
    -F "metadata={name : 'sample.png', parents: ['### folder ID ###']};type=application/json;charset=UTF-8" \
    -F "file=@sample.png;type=image/png" \
 "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart"
Useful tricks for Android gradle files
- build time
- ci_job
- dependencies
- force a lang for a specific flavor
- gcm flavorish google-services.json
- git commit count
- git sha
- isIdeBuild
@wkwiatek
wkwiatek / app-1.spec.ts
Last active December 17, 2021 01:52
Angular 2 test snippets for Angular final version. Codebase for https://developers.livechatinc.com/blog/category/programming/angular-2/
// App
import { Component } from '@angular/core';
@Component({
selector: 'app',
template: '<span>{{ sayHello() }}</span>',
})
export class App {
public name: string = 'John';
@AKiniyalocts
AKiniyalocts / generate_icons.sh
Last active October 16, 2018 18:03
Generate resized icons for your android applications using imagemagick!
#!/bin/bash
# This requires imagemagick (a super awesome image tool)
# Install via: sudo apt-get install imagemagick
echo "Enter the path to the 512x512 icon"
read icon
mkdir "drawable-mdpi" "drawable-hdpi" "drawable-xhdpi" "drawable-xxhdpi" "drawable-xxxhdpi"
@NeptunKid
NeptunKid / rAF.js
Created May 1, 2015 11:44 — forked from paulirish/rAF.js
requestAnimationFrame polyfill by Erik Möller.
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@hephaestus9
hephaestus9 / SieveOfAtkin-Java.java
Last active June 13, 2017 14:50
Sieve Of Atkin - Java
/*
* The function of this class is to find all prime numbers in range given by the user.
*
* This homework assignment requires several references:
* http://www.avajava.com/tutorials/lessons/how-do-i-use-threads-join-method.html
* http://stackoverflow.com/questions/1428786/best-way-to-find-a-prime-number
* http://web.mit.edu/16.070/www/lecture/big_o.pdf
* http://en.wikipedia.org/wiki/Sieve_of_Atkin
* http://stackoverflow.com/questions/3790142/java-equivalent-of-pythons-rangeint-int
* http://stackoverflow.com/questions/17279519/removing-items-from-list-in-java
@L422Y
L422Y / !README.md
Last active June 1, 2023 17:08
Dynamic, Responsive font-sizes and spacing using em units and JavaScript

Dynamic responsive font-sizing is something I see missing on many “responsive” websites. Breakpoints are nice but I have better things to do with my time than defining infinite font-size adjustments. (so do you!)

To implement this, we’re going to take advantage of the em font sizing unit in CSS.

Click here to see what I'm talking about: codepen.io/lawrencealan/full/eJqlu

Text sizing using the em unit

A single em is equal to the current font-size of the closest parent which has a font-size set.

$app->match('/export', function() use($app){
$sql = 'SELECT * FROM partial_customers';
$records = $app['db']->fetchAll($sql);
header("Content-Type: text/csv");
header("Content-Disposition: attachment; filename=partial_customers.csv");
header("Pragma: no-cache");
header("Expires: 0");
$output = fopen("php://output", "w");
@KWMalik
KWMalik / interviewitems.MD
Created September 16, 2012 22:04 — forked from amaxwell01/interviewitems.MD
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go