Skip to content

Instantly share code, notes, and snippets.

@hwdsl2
hwdsl2 / .MOVED.md
Last active May 19, 2024 06:28
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@pavelbinar
pavelbinar / gist:6333285
Last active July 27, 2022 07:49
JavaScript: Random Boolean
/* Random Boolean */
var randomNumber = Math.random() >= 0.5;
console.log(randomNumber);
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@seamusabshere
seamusabshere / delayed_job_singleton.rb
Created February 18, 2011 15:38
how we hacked DelayedJob 2.0.3 logs in Rails 3
#!/usr/bin/env ruby
PRESUMPTIVE_RAILS_ROOT = "/data/[APP_NAME]/current"
LOG_PATH = "/data/[APP_NAME]/shared/log/delayed_job_singleton.log"
Dir.chdir PRESUMPTIVE_RAILS_ROOT
require 'home_run'
require "rubygems"
require "bundler/setup"