$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e} /ve /t REG_SZ /d "Recent Items" /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e}\DefaultIcon /ve /t REG_EXPAND_SZ /d "%SystemRoot%\system32\imageres.dll,-117" /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e} /v System.IsPinnedToNameSpaceTree /t REG_DWORD /d 0x1 /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e} /v SortOrderIndex /t REG_DWORD /d 0x42 /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e}\InProcServer32 /ve /t REG_EXPAND_SZ /d %%systemroot%%\system32\shell32.dll /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e}\Instance /v CLSID /t REG_SZ /d {0E5AAE11-A475-4c5b-AB00-C66DE400274E} /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49bd7e}\Instance\InitPropertyBag /v Attributes /t REG_DWORD /d 0x11 /f | |
reg add HKCU\Software\Classes\CLSID\{3f3f327e-5577-4649-ae6e-6cc43b49b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CasePattern | |
def initialize(arr) | |
@arr = arr | |
end | |
def ===(other_arr) | |
@arr.zip(other_arr).all?{ |x1, x2| x1 === x2 } | |
end | |
module ConstructorContext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test;" | |
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test;" | |
psql --dbname=app_test --no-psqlrc -c < db/structure.sql | |
for n in $(seq 2 $parallel_tests_count); do | |
( | |
psql --dbname=postgres --no-psqlrc -c "DROP DATABASE IF EXISTS app_test$n;" | |
psql --dbname=postgres --no-psqlrc -c "CREATE DATABASE app_test$n WITH TEMPLATE app_test;" | |
) & | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example: | |
# | |
# Content.find_each.with_progress{ |c| do_something(c) } | |
# | |
# Will do_something to each content and print out a nice progress bar as it goes | |
class Enumerator | |
def with_progress | |
return to_enum(__callee__) unless block_given? | |
bar_chars = %w( ▏ ▎ ▍ ▌ ▋ ▊ ▉ ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
actions: { | |
clickOutside(event) { | |
const $target = Ember.$(event.target); | |
const clickedOutside = typeof $target.data('outside') !== 'undefined'; | |
alert("Clicked outside: " + (clickedOutside ? "yes" : "no")); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
model: null, | |
actions: { | |
// This is fired when the user selects a new time zone | |
// from the dropdown. | |
changeTimeZone(tz) { | |
this.set('model.timeZone', tz); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
model: null, | |
actions: { | |
// This is fired when the user selects a new time zone | |
// from the dropdown. | |
changeTimeZone(tz) { | |
this.set('model.timeZone', tz); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -f Serge\ Lang\ -\ SL2\(R\)\ \(978-1-4612-5142-2\).pdf ]; then | |
echo "downloading 978-1-4612-5142-2" | |
curl -L http://link.springer.com/content/pdf/10.1007/978-1-4612-5142-2.pdf > Serge\ Lang\ -\ SL2\(R\)\ \(978-1-4612-5142-2\).pdf.tmp | |
mv Serge\ Lang\ -\ SL2\(R\)\ \(978-1-4612-5142-2\).pdf{.tmp,} | |
fi | |
if [ ! -f David\ Cox\ John\ Little\ Donal\ OShea\ -\ Ideals,\ Varieties,\ and\ Algorithms\ \(978-1-4757-2693-0\).pdf ]; then | |
echo "downloading 978-1-4757-2693-0" | |
curl -L http://link.springer.com/content/pdf/10.1007/978-1-4757-2693-0.pdf > David\ Cox\ John\ Little\ Donal\ OShea\ -\ Ideals,\ Varieties,\ and\ Algorithms\ \(978-1-4757-2693-0\).pdf.tmp | |
mv David\ Cox\ John\ Little\ Donal\ OShea\ -\ Ideals,\ Varieties,\ and\ Algorithms\ \(978-1-4757-2693-0\).pdf{.tmp,} | |
fi |
NewerOlder