Skip to content

Instantly share code, notes, and snippets.

View infernalsirius's full-sized avatar

Patrick Meunier infernalsirius

View GitHub Profile
@infernalsirius
infernalsirius / boxstarter.txt
Last active July 8, 2016 21:36
Boxstarter provision script for windows server
#The Boxstarter Killer Feature: Handling Reboots!!!
# Enable Big-Kid Mode
#Disables UAC. Note that Windows 8 and 8.1 can not launch Windows Store applications with UAC disabled.
Disable-UAC
Update-ExecutionPolicy -Policy Unrestricted
# Disable Password Expiration
Write-BoxstarterMessage "Disabing password expiration..."
wmic useraccount where "name='$([Environment]::UserName)'" set PasswordExpires=FALSE
{% comment %} Width of results box {% endcomment %}
{% assign results_box_width = '242px' %}
{% comment %} Background color of results box {% endcomment %}
{% assign results_box_background_color = '#ffffff' %}
{% comment %} Border color of results box {% endcomment %}
{% assign results_box_border_color = '#d4d4d4' %}
<script>
$(function() {
// Current Ajax request.
{% layout none %}
{% capture results %}
{% for item in search.results %}
{% assign product = item %}
{
"title" : {{ product.title | json }},
"url" : {{ product.url | within: product.collections.last | json }},
"thumbnail": {{ product.featured_image.src | product_img_url: 'thumb' | json }}
}
{% unless forloop.last %},{% endunless %}
@infernalsirius
infernalsirius / semantic-ui-algolia.js
Created May 4, 2017 12:07 — forked from remyvhw/semantic-ui-algolia.js
Semantic UI & Algolia search
/*
Implementing Semantic UI and Algolia search can be a pain in the but if you're not use to deal with Semantic UI API stuff. This feels a little bit hackish but so far it works well enough; bonus for not needing the Algolia javascript client.
*/
var algolia = {
id: "Algolia app ID",
key: "Public key",
index: "Index name"
};
@infernalsirius
infernalsirius / working_url.rb
Created May 26, 2017 03:37 — forked from tb/working_url.rb
Check if URL exists in Ruby
require 'net/http'
def working_url?(url_str)
url = URI.parse(url_str)
Net::HTTP.start(url.host, url.port) do |http|
http.head(url.request_uri).code == '200'
end
rescue
false
end
@infernalsirius
infernalsirius / ffmpeg-install.sh
Created July 3, 2017 22:14 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/url?https://gist.github.com/bunchc/44e380258384505758b6244e615e75ed/raw/d648fffc21cb3cc7df79e50be6c05b05d29c79cc/0-SystemConfiguration.txt
#########################################
# Set Execution Policy #
#########################################
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
@infernalsirius
infernalsirius / boxstarter.ps1
Created September 19, 2017 13:55 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
(Get-WmiObject win32_operatingsystem).version
Output:
6.1.7601
(Get-WmiObject Win32_OperatingSystem).Caption
Output :
Microsoft Windows 7 Ultimate
Get-WmiObject Win32_OperatingSystem | Select PSComputerName, Caption, OSArchitecture, Version, BuildNumber | FL
@infernalsirius
infernalsirius / gatekeeperDisable.sh
Last active February 24, 2021 07:12
[Turn Gatekeeper On/Off]Necessary sometimes to open downloaded app and allow from anywhere. #macos
# Disable Gatekeeper
sudo spctl --master-disable