Skip to content

Instantly share code, notes, and snippets.

View samsoir's full-sized avatar

Sam de Freyssinet samsoir

View GitHub Profile
@samsoir
samsoir / .vimrc
Created May 17, 2019 21:17
Vim Configuration
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kchmck/vim-coffee-script'
Plugin 'raimon49/requirements.txt.vim'
@samsoir
samsoir / .vimrc
Created May 17, 2019 21:17
Vim Configuration
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kchmck/vim-coffee-script'
Plugin 'raimon49/requirements.txt.vim'
{
"payload":
{
"event_type":"subscription_cancelled",
"sso_uuid":"259444d1-acdc-5458-8fba-4414318b12d4",
"subscription_id":378901,
"context":{
"ip":"12.233.14.131",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36",
"page": {
@samsoir
samsoir / xcode-sucks.sh
Last active August 29, 2015 14:19
What to run when Xcode 6.x locks up and will not respond
#!/bin/bash
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
echo -e '\n [ \033[1;32mDONE\033[0m ]\t\033[0;36mXcode sucks! Yes! Yes it does!\033[0m\n'
bind s split-window -v
bind v split-window -h
bind ^s split-window -v
bind ^v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
curl -v https://staging.sitterati.com/account -H "X-Sitterati-Access-Token: AAAEbZAobMyqcBAGSrP4Rt0zmiGaLt3MNr1ZCCxsejQW6RxATwInPYUUZC7ri0DsPMeCdl4jSgW8I9BkvX4AtfjwDbKM4n14Fjd7Do2ZB65lfIX82jKZBh" -H "X-Sitterati-Token-Provider: facebook" -H "Accept: application/json; version=1"
* About to connect() to staging.sitterati.com port 443 (#0)
* Trying 54.243.155.39...
* connected
* Connected to staging.sitterati.com (54.243.155.39) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
"alert" : { "loc-key" : "CONNECTION_REQUEST", "loc-args" : [ "Sam D."] }
@samsoir
samsoir / MSAContactDiscoveryViewController.m
Created November 8, 2012 05:00
Problem code abstract
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
SCContactPerson *contactPerson = [self.contactSelectionTableDataArray objectAtIndex:indexPath.row];
[self decorateContactPerson:contactPerson fromFbUser:self.userDict];
[contactPerson updateRecord:contactPerson.ABRecordID error:nil];
if ([contactPerson ABRecordID] == kABRecordInvalidID)
{
ABAddressBookRef addressBook = SCAddressBookCreate(NULL, NULL);
- (void)main
{
SCSitteratiRequest *request = [SCSitteratiRequest requestAction:SitteratiActionRefresh onResource:SitteratiResourceFriends];
[_client submitRequest:request];
}
- (void)configureTableCellForStatus:(UITableViewCell *)cell jobModel:(MSASitteratiJob *)job
{
NSString *statusString = NSLocalizedStringFromTable(@"Pending", @"MyJobs", @"Pending");
BOOL jobAccepted = (job.acceptedSitter != nil);
if (jobAccepted)
{
statusString = NSLocalizedStringFromTable(@"Accepted", @"MyJobs", @"Accepted");
}