Skip to content

Instantly share code, notes, and snippets.

View tcostam's full-sized avatar
Need more coffee

Tiago Costa tcostam

Need more coffee
View GitHub Profile
@AWeg
AWeg / CopyAsanaTasks.php
Last active May 5, 2020 01:04 — forked from mhdhejazi/CopyAsanaTasks.php
main changes: - Asana has own SSL cert -> had to add to lines of code - copies subtasks and up to 11 subtasks of subtasks - copies tags -> only tagnames not followers/descriptions
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null)
{
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@patriciogonzalezvivo
patriciogonzalezvivo / PythonSetup.md
Created October 7, 2014 23:17
How to install Python correctly on Mac OSX

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@shacker
shacker / gist:87908e13c9ee6655ce90
Last active October 5, 2023 17:46
Using the Workday API with Python and the suds client library
import sys
from suds import client
from suds.wsse import Security, UsernameToken
from suds.sax.text import Raw
from suds.sudsobject import asdict
from suds import WebFault
'''
Given a Workday Employee_ID, returns the last name of that employee.
@Dhertz
Dhertz / Ubuntu_Aerial.md
Last active March 28, 2023 02:06
Quick overview of how to get Apple's new TV screensavers working on most linux systems.

Using Apple’s Aerial Screensavers on Ubuntu After coming across the [Aerial] (https://github.com/JohnCoates/Aerial) screensavers for Mac, and installing them, I decided that I had had enough of the graphics-demos of my Ubuntu Precise system. I hope to provide a simple guide on how to add them to your setup as well.

First, you need to install xscreensaver (for example with aptitude, but your distro should have it):

sudo aptitude install xscreensaver
@henriquemenezes
henriquemenezes / .vimrc
Last active August 11, 2020 14:47
.vimrc
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle
call vundle#begin() " and initialize
" Keep Plugin commands between vundle#begin/end.
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
@henriquemenezes
henriquemenezes / pre-commit
Created March 8, 2016 20:33
Git's pre-commit hook to remove trailing whitespaces/tabs Raw
#!/bin/sh
#
# This will remove the trailing whitespaces from the files and add it again to be committed.
#
# Put this into ~/.git-templates/hooks/pre-commit, and chmod +x it.
# Detect platform
platform="win"
uname_result=`uname`
if [ "$uname_result" = "Linux" ]; then
@henriquemenezes
henriquemenezes / one-line-web-server.md
Created March 16, 2016 20:48
List of one-line web servers

One-line Web Servers

Python 2.x

python -m SimpleHTTPServer 8080

Python 3.x

@henriquemenezes
henriquemenezes / array-diff.js
Created March 17, 2016 20:08
JS array diff
function arrayDiff(a1, a2) {
var diff = {};
for (var i = 0; i < a1.length; i++) {
diff[a1[i]] = true;
}
for (var i = 0; i < a2.length; i++) {
if (diff[a2[i]]) {
delete diff[a2[i]];
@henriquemenezes
henriquemenezes / vim.md
Last active February 18, 2020 04:22
Vim

Vimtutor:

Tips & Tricks

	:source $MYVIMRC	Reload .vimrc without restart vim, after reload run :e
	:e 			Reload buffer and trigger FileType event

Modes: