This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install WinGet | |
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901 | |
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller' | |
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") { | |
"Installing winget Dependencies" | |
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' | |
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'twitter' | |
require 'open-uri' | |
require 'date' | |
require 'uri' | |
# $ grep TWITTER_MARKDOWN ~/.bash_profile | |
# export TWITTER_MARKDOWN_consumer_key=XXXXXXXXXXXXXXXXXXXXXXXXXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Google Sheets の最終行に追記するスクリプト | |
# 訳あって最終行の位置を特定するために行数を取得している | |
# OAuth周りは下記がわかりやすい | |
# https://qiita.com/shin1ogawa/items/49a076f62e5f17f18fe5 | |
CLIENT_ID="Google API ClientID" | |
CLIENT_SECRET="Google API's client secret" | |
REFRESH_TOKEN="Google API's refresh token" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on | |
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
# https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
#--- Uninstall unnecessary applications that come with Windows out of the box --- | |
# Microsoft | |
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fileid="FILEIDENTIFIER" | |
filename="FILENAME" | |
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null | |
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$T = @" | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace Win32 | |
{ | |
public static class SetupApi | |
{ | |
// 1st form using a ClassGUID only, with Enumerator = IntPtr.Zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
echo deb https://apt.dockerproject.org/repo ubuntu-`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d'=' -f2` main >> /etc/apt/sources.list.d/docker.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D | |
apt-get update | |
apt-get purge lxc-docker* | |
apt-get purge docker.io* | |
apt-get install docker-engine | |
exit |
NewerOlder