Skip to content

Instantly share code, notes, and snippets.

View HGebhardt's full-sized avatar

Hendrik Gebhardt HGebhardt

View GitHub Profile
require 'google/apis/identitytoolkit_v3'
require 'googleauth'
require 'json'
# Creates user accounts with email and password
class FirebaseAccountManager
# Konstanten ruhig in die Klassen ziehen, wenn die einen direkten Bezug haben
SCOPE = [
'https://www.googleapis.com/auth/firebase',
'https://www.googleapis.com/auth/identitytoolkit',
@HGebhardt
HGebhardt / remove.js
Created June 26, 2017 07:39
Remove Google Chrome custome search engines
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList().then(function(val){
val.others.forEach(function(engine) {
console.log(engine.displayName);
settings.SearchEnginesBrowserProxyImpl.prototype.removeSearchEngine(engine.modelIndex);
});
});
@HGebhardt
HGebhardt / psql2sqlite.sed
Created April 28, 2015 12:49
Convert PostgreSQL data to SQLite
#! /bin/sed -f
# remove configuration settings
/^SET /d
# remove comments
/^--/d
# remove sequence values
/^SELECT pg_catalog.setval/d

Keybase proof

I hereby claim:

  • I am hgebhardt on github.
  • I am hgebhardt (https://keybase.io/hgebhardt) on keybase.
  • I have a public key whose fingerprint is C8DF 6890 83AC 02D4 1711 3E39 7F06 3992 D7D6 A711

To claim this, I am signing this object:

@HGebhardt
HGebhardt / db_truncate.rake
Created May 28, 2013 13:10
rake db:truncate (PostgreSQL)
namespace :db do
desc 'Truncate all tables of the database'
task :truncate => :environment do
ActiveRecord::Base.establish_connection
tables = ActiveRecord::Base.connection.tables-["schema_migrations"]
ActiveRecord::Base.connection.execute("TRUNCATE #{tables.join(', ')} RESTART IDENTITY")
end
end
#!/bin/bash
#
# => $ sudo apt-get install -y --force-yes curl; sudo su - -c "bash < <(curl -sL http://is.gd/..........)"
#
# Deploy Fat Free CRM (rails3 branch) to a freshly installed Ubuntu machine.
# --------------------------------------------------------------------------
#
# Steps:
#
# *) Install required packages (git, postgresql, etc.)
@HGebhardt
HGebhardt / self_signed_cert.rb
Created May 16, 2012 18:05 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
We couldn’t find that file to show.
@HGebhardt
HGebhardt / Cookie
Created December 7, 2011 21:50
New Google Design (December 2011)