Skip to content

Instantly share code, notes, and snippets.

View Overbryd's full-sized avatar

Lukas Rieder Overbryd

View GitHub Profile
@Overbryd
Overbryd / Windows10-Setup.ps1
Created April 5, 2020 19:01 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@Overbryd
Overbryd / gist:5857940
Last active December 18, 2015 22:59 — forked from fs111/gist:5857739
# thing to parse
foo="1.2.3"
# spilt in array
IFS=. read -a arr <<< "$foo"
echo ${arr[0]}
# prints 1
@Overbryd
Overbryd / js_steps.rb
Created July 7, 2011 22:19 — forked from kilaulena/js_steps.rb
Test capybara visibility
Then /^"([^"]+)" should not be visible(?: within "([^\"]*)")?$/ do |text, selector|
wait_until do
its_hidden = page.evaluate_script("$('#{selector}:contains(#{text})').is(':hidden');")
its_not_in_dom = page.evaluate_script("$('#{selector}:contains(#{text})').length == 0;")
(its_hidden || its_not_in_dom).should be_true
end
end
Then /^"([^"]+)" should be visible(?: within "([^\"]*)")?$/ do |text, selector|
wait_until do
@Overbryd
Overbryd / rails_admin_without_devise.md
Created July 6, 2011 19:17 — forked from phoet/rails_admin_without_devise.rb
Using RailsAdmin without devise

Using rails_admin without devise

Having a buckload of code to authorize users on your application is something you may like or not. Speaking for myself I hate it. But I still love rails_admin, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.

Add RailsAdmin to your Gemfile

do NOT add devise

gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"