This file contains hidden or 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
# See http://help.github.com/ignore-files/ for more about ignoring files. | |
# Compiled output | |
/dist | |
/tmp | |
/out-tsc | |
/build | |
# Runtime data | |
pids |
This file contains hidden or 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
let unique_array = Array.from(not_unique_array | |
.reduce((a, b) => a.set(b, b), new Map()) | |
).map(v => v[1]); |
This file contains hidden or 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
.fiddle { | |
color: red; | |
font-weight: bolder; | |
} |
This file contains hidden or 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
''' | |
translate.py | |
Management script for Django to easily run the | |
'makemessages'-command and 'compilemessages'-command for all | |
files in your Django application. | |
Put in any registered django app in the location | |
<app>/management/commands/translate.py | |
and then use python manage.py translate | |
to run makemessages on all files in your project |
This file contains hidden or 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
def has_changed(instance, field): | |
if not instance.pk: | |
return False | |
old_value = instance.__class__._default_manager.filter(pk=instance.pk).values(field).get()[field] | |
return not getattr(instance, field) == old_value |
This file contains hidden or 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
Get-ChildItem "C:\Path\To\Pics" -recurse | Where {-Not $_.PSIsContainer} | Rename-Item -NewName {$_.FullName.ToLower()} |
This file contains hidden or 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
# /bin/bash | |
npm uninstall `ls -1 node_modules | tr '/\n' ' '` |
This file contains hidden or 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
<div style="display: block; text-align: center;"> | |
<div style="display: inline-block"> | |
<div class="wrapper" style="display: table; text-align: left"> | |
<a href="#" target="_blank"><img alt="Wib Ami Video" src="/assets/225577/fullsize/wib_ami_video.jpg" style="display: block; text-align: center;"></a> | |
<div class="caption" style="display: table-caption; caption-side: bottom;">Ami: Network means an open, helping hand</div> | |
</div> | |
</div> | |
</div> |
This file contains hidden or 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
USE master; | |
GO | |
ALTER DATABASE AdventureWorks2012 | |
SET SINGLE_USER | |
WITH ROLLBACK IMMEDIATE; | |
GO | |
ALTER DATABASE AdventureWorks2012 | |
SET READ_ONLY; | |
GO | |
ALTER DATABASE AdventureWorks2012 |