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
| function Remove-OldModules | |
| { | |
| Write-Prompt "------------------------------------------" -ForegroundColor Cyan | |
| Write-Prompt "Removing old versions of installed modules" -ForegroundColor Cyan | |
| Write-Prompt "------------------------------------------" -ForegroundColor Cyan | |
| $modules = Get-InstalledModule | |
| Write-Prompt "$($modules.count) module(s) found." -ForegroundColor Yellow | |
| Write-Prompt "" | |
| foreach ($module in $modules) |
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
| [core] | |
| editor = "code --wait" | |
| [diff] | |
| tool = default-difftool | |
| [difftool "default-difftool"] | |
| cmd = "code --wait --diff $LOCAL $REMOTE" | |
| [merge] |
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
| function Test-IsAdmin { | |
| try { | |
| $identity = [Security.Principal.WindowsIdentity]::GetCurrent() | |
| $principal = New-Object Security.Principal.WindowsPrincipal -ArgumentList $identity | |
| return $principal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ) | |
| } catch { | |
| throw "Failed to determine if the current user has elevated privileges. The error was: '{0}'." -f $_ | |
| } | |
| <# |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here] | |
| @="Open cmd here" | |
| "Icon"="cmd.exe" | |
| [HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here\command] | |
| @="cmd.exe /s /k pushd \"%V\"" | |
| [HKEY_CLASSES_ROOT\Directory\shell\cmd_here] |
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
| [alias] | |
| ec = config --global -e | |
| br = branch | |
| sa = !git add --all | |
| ca = !git add --all && git commit -m | |
| up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
| lrb = !git remote -v | |
| co = checkout | |
| cob = checkout -b | |
| crb = !git cob $1 && git push origin -u |
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
| language: ruby | |
| rvm: 2.3.3 | |
| branches: | |
| only: | |
| - master | |
| script: bundle exec rake test |
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
| rmdir _site /s /q | |
| rmdir .sass-cache /s /q | |
| del Gemfile.lock |
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
| @mixin slated-top-left($size, $foreground, $background) { | |
| content: ''; | |
| position: absolute; | |
| width: 0; | |
| top: 0; | |
| left: 0; | |
| border-top: $size solid $background; | |
| border-right: $size solid $foreground; | |
| } |
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
| <ul class="post-archive"> | |
| {% for p in site.posts %} | |
| <li> | |
| {% assign fdate = p.date | date: '%b %Y' %} | |
| {% if cur_date != fdate %} | |
| {% assign cur_date = fdate %} | |
| <h3>{{ p.date | date: '%B, %Y' }}</h3> | |
| {% endif %} | |
| <a href="{{ p.url }}">{{ p.title }}</a> | |
| </li> |
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
| <?php | |
| /* | |
| Plugin Name: Session Activator | |
| Description: Enable the use of sessions ($_SESSION) in plugins and themes. | |
| Version: 1.0.0 | |
| Author: Christian Tang | |
| Author URI: http://christiantang.dk | |
| */ | |
| add_action('init', 'session_activator_start', 1); | |
| add_action('wp_logout', 'session_activator_end'); |
NewerOlder