Skip to content

Instantly share code, notes, and snippets.

View kevinpiac's full-sized avatar
🕶️
Working Hard To Create The Best Serverless Platform

Kevin Piacentini kevinpiac

🕶️
Working Hard To Create The Best Serverless Platform
View GitHub Profile
@kevinpiac
kevinpiac / update_author.sh
Created March 26, 2017 08:53
Edit commit author's Name / Email on Github
#!/bin/sh
REPO_NAME="your_repo_name"
git clone --bare "git@github.com:<username>/$REPO_NAME"
cd "$REPO_NAME"
git filter-branch --env-filter '
OLD_NAME="Name You want to change"
CORRECT_NAME="Name you want to replace by"
@kevinpiac
kevinpiac / SCAPIClient.h
Last active September 2, 2017 07:53
class_dump_output_example
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "SCBaseAPIClient.h"
@class NSDateFormatter, NSURL;
#import <UIKit/UIKit.h>
#import <objc/runtime.h>
@interface logTool: NSObject
+ (void)logDataFromNSString: (NSString *)logContent;
@end
@implementation logTool
+ (void)logDataFromNSString: (NSString *)logContent
#import <UIKit/UIKit.h>
#import <objc/runtime.h>
@interface logTool: NSObject
+ (void)logDataFromNSString: (NSString *)logContent;
@end
@implementation logTool
+ (void)logDataFromNSString: (NSString *)logContent
{
>>>> BEGIN - [SCAPI URLRequestWithEndpoint]
------------
endpoint: /loq/login
param: {
"from_deeplink" = false;
"hashed_out_alphas" = "[]";
height = 1334;
password = Password;
"pre_auth_token" = "";
"reactivation_confirmed" = false;
+ (NSString *)createLoginRequestWithUsername: (NSString *)username password: (NSString *)password
{
NSDictionary *params = @{
@"hashed_out_alphas" : @"[]",
@"height" : @"1334",
@"password" : password,
@"pre_auth_token" : @"",
@"reactivation_confirmed" : @false,
@"remember_device" : @true,
@"screen_height_in" : @"4.1",
%hook SCLoginV2ViewController
- (void)viewDidAppear:(BOOL)arg1
{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
LightSocket *server = [[LightSocket alloc] initWithPort:5632];
[server startServer];
});
%orig;
}
%end
- (void)onMessageAction:(NSString *)message
{
@autoreleasepool {
NSArray *request = [message componentsSeparatedByString:@":"];
if (request.count >= 3)
{
NSString *clientId = request[1];
NSString *action = request[2];
NSString *response;
[logTool logDataFromNSString:[NSString stringWithFormat:@"request: %@", request]];
@kevinpiac
kevinpiac / remove-all-firebase-users.js
Last active January 30, 2018 13:39
Supprimer tous les comptes utilisateur depuis l'admin Firebase
var intervalId;
var clearFunction = function() {
if ($('[aria-label="Supprimer le compte"]').size() == 0) {
console.log("interval cleared")
clearInterval(intervalId)
return
}
$('[aria-label="Supprimer le compte"]')[0].click();
setTimeout(function () {
@kevinpiac
kevinpiac / gcloud_install_before_script_ci.yaml
Created November 14, 2018 11:57
Install google cloud sdk (gcloud) on travis, gitlab and other CI providers
before_script:
- gcloud version || true
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud version