Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/usr/bin/env ruby | |
| # List all keys stored in memcache. | |
| # Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
| require 'net/telnet' | |
| headings = %w(id expires bytes cache_key) | |
| rows = [] |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| resource_not_found = {} | |
| begin | |
| resources('ruby_block[my-resource-supposed-to-exist]') | |
| rescue Chef::Exceptions::ResourceNotFound | |
| resource_not_found['ruby_block[my-resource-supposed-to-exist]'] = true | |
| end | |
| template '/etc/my/template.conf' do | |
| source 'template.conf.erb' | |
| mode '640' |
| Sometimes after a hard reboot (power cut), if your synology cannot be logged in with DSM and it shows "System is getting ready. Please log in later" , please do these steps : | |
| #Admin login via ssh | |
| > synobootseq --set-boot-done | |
| > synobootseq --is-ready | |
| #optional | |
| > /usr/syno/etc/rc.d/S97apache-sys.sh start | |
| > /usr/syno/etc/rc.d/S95sshd.sh start |
| #!/bin/bash | |
| # One-Line-ify It: wget -O- https://goo.gl/jblmAa | sudo bash - | |
| show_aws_post_setup_commands() { | |
| InstanceId=$(wget -qO- http://169.254.169.254/latest/meta-data/instance-id) | |
| RegionName=$(wget -qO- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(us-\(west\|east\)-[0-9]\)[a-z]/\1/g') | |
| cat <<MOO |
| # Download latest dotnet/codeformatter release from github | |
| $repo = "jgm/pandoc" | |
| $filenamePattern = "*x86_64.zip" | |
| $pathExtract = "C:\Tools\pandoc" | |
| $innerDirectory = $true | |
| $preRelease = $false | |
| if ($preRelease) { | |
| $releasesUri = "https://api.github.com/repos/$repo/releases" |