Skip to content

Instantly share code, notes, and snippets.

Gabriel Ribeiro gabrielribeiro

Block or report user

Report or block gabrielribeiro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gabrielribeiro
gabrielribeiro / iOS Usage Descriptions.plist
Created Mar 22, 2019
Values for usage descriptions to put in info.plist
View iOS Usage Descriptions.plist
<dict>
<key>NSCalendarsUsageDescription</key>
<string>$(PRODUCT_NAME) calendar events</string>
<key>NSRemindersUsageDescription</key>
<string>$(PRODUCT_NAME) reminder use</string>
<key>NSCameraUsageDescription</key>
<string>This app requires to access your photo library to show image on profile and send via chat</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires to access your microphone to record video with your voice send via chat</string>
<key>NSPhotoLibraryUsageDescription</key>
@gabrielribeiro
gabrielribeiro / phantomjs-linkedin.js
Last active Jul 30, 2017 — forked from pasiaj/phantomjs-linkedin.js
A phantomjs script to:a) Login to Linkedin.comb) Scrape all your contactsc) Visit all the contactsd) Automatically endorse all contacts' skills.
View phantomjs-linkedin.js
var auth = {
user: "USERNAME",
pass: "PASSWORD"
};
function ParallelRunner (list, func, runners) {
function createSlots(runners) {
var slots = [];
for (var i = 0; i < runners; i++) {
slots.push( objReturner() );
View Rename PKs
SELECT
'sp_rename ''' + OBJECT_NAME(OBJECT_ID) + ''', ''PK_' + OBJECT_NAME(parent_object_id) + '''' AS [PROC],
OBJECT_NAME(OBJECT_ID) AS NameofConstraint,
OBJECT_NAME(parent_object_id) AS TableName,
type_desc AS ConstraintType
FROM sys.objects
WHERE type_desc LIKE 'PRIMARY_KEY_CONSTRAINT' AND OBJECT_NAME(parent_object_id) <> 'sysdiagrams'
AND OBJECT_NAME(OBJECT_ID) <> 'PK_' + OBJECT_NAME(parent_object_id)
View Rename FKs
--'sp_rename ''' + obj.name + ''', ''FK_' + tab1.name + '_' + tab2.name + '_' + col2.name + '''',
SELECT
'sp_rename ''' + obj.name + ''', ''FK_' + tab1.name + '_' + tab2.name + '_' + col2.name + '''' AS [PROC],
'FK_' + tab1.name + '_' + tab2.name + '_' + col2.name + '''' AS EXPECTED_NAME,
obj.name AS FK_NAME,
tab1.name AS [table],
tab2.name AS [referenced_table],
col2.name AS [referenced_column]
FROM sys.foreign_key_columns fkc
INNER JOIN sys.objects obj
View EmptyTrash.command
#!/bin/bash
#this is a comment-the first line sets bash as the shell script
rm -rf ~/.Trash/*
exit 0
View gist:93e4405e3b7b46eb7748
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
You can’t perform that action at this time.