Skip to content

Instantly share code, notes, and snippets.

View blue0513's full-sized avatar
🤩
Always Happy Boy

Taiju Aoki blue0513

🤩
Always Happy Boy
View GitHub Profile
@primaryobjects
primaryobjects / Code.gs
Last active January 16, 2023 16:48
Export a Google Drive spreadsheet to PDF in Google Drive in the same folder.
// Simple function to add a menu option to the spreadsheet "Export", for saving a PDF of the spreadsheet directly to Google Drive.
// The exported file will be named: SheetName and saved in the same folder as the spreadsheet.
// To change the filename, just set pdfName inside generatePdf() to something else.
// Running this, sends the currently open sheet, as a PDF attachment
function onOpen() {
var submenu = [{name:"Save PDF", functionName:"generatePdf"}];
SpreadsheetApp.getActiveSpreadsheet().addMenu('Export', submenu);
}
@pocari
pocari / delayed_job_memo.md
Last active September 2, 2020 09:11
DelayedJobのワーカー内でpryを使う(rails delayed job worker pry)
'use strict';
function getInstance(consumer_key, consumer_secret) {
return new TwitterWebService_(consumer_key, consumer_secret);
}
var TwitterWebService_ = function (consumer_key, consumer_secret) {
this.consumer_key = consumer_key;
this.consumer_secret = consumer_secret;
}
@ustun
ustun / eslint-auto.el
Created January 12, 2016 23:59
run eslint --fix on emacs file save
;;; runs eslint --fix on the current file after save
;;; alpha quality -- use at your own risk
(defun eslint-fix-file ()
(interactive)
(message "eslint --fixing the file" (buffer-file-name))
(shell-command (concat "eslint --fix " (buffer-file-name))))
(defun eslint-fix-file-and-revert ()
(interactive)
@roachhd
roachhd / README.md
Last active July 7, 2024 16:12
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@hopsoft
hopsoft / db.rake
Last active July 5, 2024 14:52
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@johnmastro
johnmastro / iterm.el
Last active September 13, 2022 14:41
Send text from Emacs to iTerm
;;; iterm.el - Send text to a running iTerm instance
(require 'pcase)
(require 'thingatpt)
;; To match SublimeText's key binding:
;; (global-set-key (kbd "<C-return>") 'iterm-send-text)
(defvar iterm-default-thing 'line
"The \"thing\" to send if no region is active.
@lawrencejones
lawrencejones / refresh.applescript
Created February 9, 2014 22:21
Applescript to refresh Google Chrome
tell application "Chrome" to tell the active tab of its first window
reload
end tell
@seratch
seratch / getting_started_ja.md
Last active June 5, 2018 02:56
Skinny Framework 1.0 Introduction in Japanese

NOTICE: This is just a draft of Skinny framework introduction (written in Japanese for now). English version will be published soon.

Skinny Framework とは

Logo

https://github.com/seratch/skinny-framework

Skinny Framework は Scala のフルスタックな Web アプリケーション開発フレームワークです。2014/03 を目処に最初の安定バージョン 1.0.0 をリリースするべく精力的に開発しています。(追記: 2014/03/28 に 1.0.0 がリリースされました)

@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm