Skip to content

Instantly share code, notes, and snippets.

View r35krag0th's full-sized avatar
🤖
Beep Boop.

Bob Saska r35krag0th

🤖
Beep Boop.
View GitHub Profile
@Splaxi
Splaxi / download-latest-release.ps1
Last active September 11, 2024 06:01 — forked from MarkTiedemann/download-latest-release.ps1
Download latest GitHub release via Powershell
# 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"
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 4, 2024 12:28
set -e, -u, -o, -x pipefail explanation
#!/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
@ludoo0d0a
ludoo0d0a / gist:8d0cfd1cab22598cb5d8
Created June 11, 2015 18:54
Synology boot locked
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
@scalp42
scalp42 / check_resource.rb
Created November 22, 2013 21:04
Figure if a resource exists or not in Chef before notifying it
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'
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active October 26, 2024 07:45
A badass list of frontend development resources I collected over time.
@bkimble
bkimble / gist:1365005
Last active August 22, 2024 14:21
List local memcached keys using Ruby
#!/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 = []