Skip to content

Instantly share code, notes, and snippets.

View bran921007's full-sized avatar
๐Ÿ 
Working from home

Fran Perez bran921007

๐Ÿ 
Working from home
View GitHub Profile
@bran921007
bran921007 / export-gitlab-snippets.ps1
Created December 27, 2018 01:15 — forked from chustedde/export-gitlab-snippets.ps1
Export snippets from GitLab
# Quick 'n' dirty script to export snippets from GitLab to local files. Useful if you're
# migrating to GitHub or just want to back up your snippets as files. Doesn't catch errors
# or anything like that, but what were you expecting for a Gist? :-) Also, this will only
# export snippets that are visible to you, so other users' private snippets are excluded.
# Tested with GitLab v8.5.1
$username = "username" # Your username goes here
$password = "password" # Your password goes here
$baseURL = "https://your.gitlab.base.url" # Your GitLab base URL goes here
@bran921007
bran921007 / gist:0a3f1b618665b300518051eba388f0d5
Created December 21, 2018 17:13 — forked from erajanraja24/gist:2c51e76f906c49f341f331920111aca3
Scrape Google search results -Title, URL by Location
function scrapeGoogle() {
var searchResults=UrlFetchApp.fetch("https://www.google.co.uk/search?q="+encodeURIComponent("keyword finder tool")+"&num=30",{muteHttpExceptions:true});
var titleExp=/<h3 class=\"r\">([\s\S]*?)<\/h3>/gi;
var urlExpression=/<h3 class=\"r\">([\s\S]*?)\&amp\;/gi;
var titleResults=searchResults.getContentText().match(titleExp);
@bran921007
bran921007 / gist:705f62bcca7787c7435fd18d3fe61caf
Created December 16, 2018 06:33 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • โŒ˜ : Command key
  • โŒƒ : Control key
  • โŒซ : Delete key
  • โ† : Left arrow key
  • โ†’ : Right arrow key
  • โ†‘ : Up arrow key
@bran921007
bran921007 / helpers.php
Created November 11, 2018 07:28 — forked from mabasic/helpers.php
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@bran921007
bran921007 / AuthController.php
Created November 11, 2018 02:15
JWT authentication for Lumen 5.6
<?php
namespace App\Http\Controllers;
use Validator;
use App\User;
use Firebase\JWT\JWT;
use Illuminate\Http\Request;
use Firebase\JWT\ExpiredException;
use Illuminate\Support\Facades\Hash;
@bran921007
bran921007 / countries.json
Created December 6, 2017 11:15 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'ร…land Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},

Setup Work

  • Make a list of competitive/alternative services: See competitors.md file
  • Set up Google News alerts for "side project marketing" and "startup marketing".
  • Make list of blogs, subscribe to RSS feeds in Feedbin:
    • Startup marketing blogs
    • Side project blogs
    • Small business marketing blogs
    • Chicago small business/startup bloggers
  • Come up with a name and domain name
- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.
@bran921007
bran921007 / tweet_dumper.py
Created June 30, 2017 18:51 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@bran921007
bran921007 / facebook-login.sh
Created January 26, 2016 17:13 — forked from hubgit/facebook-login.sh
Login to Facebook using cURL
#!/bin/bash
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again
EMAIL='YOUR_EMAIL' # edit this
PASS='YOUR_PASSWORD' # edit this
COOKIES='cookies.txt'
USER_AGENT='Firefox/3.5'