Skip to content

Instantly share code, notes, and snippets.

View yayoc's full-sized avatar
🌏
🚨🐠☄️🌈ॐ؞ৢ؞ؙؖ⁽⁾🧤🐠☄️˜ัิีึื์๎้็๋๊⦁ ☀️🐘ཫ་῍̩̖̬ ̎ ̎✧🌺ᕦ(;*Σ📊⏣ OO📼🍄●⦁   ●  ⦁  ●

yayoc yayoc

🌏
🚨🐠☄️🌈ॐ؞ৢ؞ؙؖ⁽⁾🧤🐠☄️˜ัิีึื์๎้็๋๊⦁ ☀️🐘ཫ་῍̩̖̬ ̎ ̎✧🌺ᕦ(;*Σ📊⏣ OO📼🍄●⦁   ●  ⦁  ●
View GitHub Profile
@yayoc
yayoc / send-completed-tasks-on-omnifocus.scpt
Last active October 7, 2020 13:56
Send completed tasks on OmniFocus via email.
set todayDate to current date
set todayTime to time of todayDate
set lastWeekDate to todayDate - (6 * days) - todayTime
set recipientName to "yayoc"
set recipientAddress to "hi@yayoc.com"
set emailSubject to "Weekly Review (" & short date string of (lastWeekDate) & "-" & short date string of (todayDate - todayTime) & ")"
set emailContent to ""
namespace JSONAPIClientUtils {
export const queryParams = (params: { [key: string]: any }) => {
return Object.keys(params)
.map(k => encodeURIComponent(k) + "=" + encodeURIComponent(params[k]))
.join("&");
};
const DEFAULT_HEADERS = {
Accept: "application/json",
"Content-Type": "application/json"

Keybase proof

I hereby claim:

  • I am yayoc on github.
  • I am yayoc (https://keybase.io/yayoc) on keybase.
  • I have a public key ASBdzByQjE4i9fbN6XYrg5Zat-QVfPtegJWw9PZiINCVqwo

To claim this, I am signing this object:

@yayoc
yayoc / aws_cf_invalidate.rb
Created January 24, 2017 06:31 — forked from jmlacroix/aws_cf_invalidate.rb
Command line script to invalidate cloudfront objects
require 'rubygems'
require 'hmac-sha1'
require 'net/https'
require 'base64'
s3_access='S3_ACCESS_KEY'
s3_secret='S3_SECRET_KEY'
cf_distribution='CLOUDFRONT_DISTRIBUTION_ID'
if ARGV.length < 1
@yayoc
yayoc / gist:df17c458474193d741a5
Last active August 29, 2015 14:18
get title from web view
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSString *title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];
self.title = title;
}
$(document).ready(function () {
function exportTableToCSV($table, filename) {
var $rows = $table.find('tr:has(td)'),
// Temporary delimiter characters unlikely to be typed by keyboard
// This is to avoid accidentally splitting the actual contents
tmpColDelim = String.fromCharCode(11), // vertical tab character
@yayoc
yayoc / vbs
Created June 27, 2014 08:15
Url encode function
Function URLEncode(url)
Dim sc
Set sc = CreateObject("ScriptControl")
sc.Language = "JScript"
Dim js
Set js = sc.CodeObject
URLEncode = js.encodeURI(url)
End Function
@yayoc
yayoc / gist:720977ed6860ab8e2915
Created June 5, 2014 01:22
Search Sql Server modules
SELECT O.type,O.name,M.definition
FROM sys.sql_modules AS M
JOIN sys.objects AS O ON M.object_id = O.object_id
WHERE M.definition LIKE '%keyword%'