- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
Discover gists
This file has been truncated, but you can view the full file.
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
DON QUIJOTE DE LA MANCHA | |
Miguel de Cervantes Saavedra | |
PRIMERA PARTE | |
CAPÍTULO 1: Que trata de la condición y ejercicio del famoso hidalgo D. Quijote de la Mancha |
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
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA= |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
/* | |
* Adyen 4.5.0 encryption by github.com/levi-nz | |
* | |
* This code is a rough implementation and can be improved in some places. | |
* Read comments throughout the code for more information. | |
*/ | |
const jose = require('node-jose'); | |
// Parse the key from the string found in securedFields.html ("10001|...") |
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
<? | |
$purifier_config = HTMLPurifier_Config::createDefault(); | |
$purifier_config->set('HTML.AllowedElements', 'p, a, ul, ol, li, h1, h2, h3, h4, h5, h6, br, strong, em, b, i'); | |
$purifier_config->set('HTML.AllowedAttributes', ''); | |
$purifier_config->set('CSS.AllowedProperties', ''); | |
$purifier_config->set('AutoFormat.RemoveEmpty', true); | |
$purifier_config->set('AutoFormat.AutoParagraph', true); | |
// May cause problems with empty table cells and headers |
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
import { useMediaQuery } from 'usehooks-ts' | |
import { useMemo } from 'react'; | |
import resolveConfig from 'tailwindcss/resolveConfig'; | |
import tailwindConfig from '../../tailwind.config'; | |
const fullConfig = resolveConfig(tailwindConfig); | |
const { screens } = fullConfig.theme; | |
type Breakpoints = keyof typeof screens; | |
type ResponsiveValue<T> = T extends boolean ? boolean : T extends string ? T : keyof T; |
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
if (window.location.origin !== "https://www.instagram.com") { | |
window.alert( | |
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.", | |
); | |
window.location.href = "https://www.instagram.com"; | |
console.clear(); | |
} | |
const fetchOptions = { | |
credentials: "include", |
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
<?php | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
Flatsome.behaviors['lazy-load-images'].attach(); | |
Flatsome.behaviors['quick-view'].attach(); | |
}); |
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
using UnityEditor; | |
using UnityEngine; | |
[CustomEditor(typeof(MeshFilter))] | |
public class NormalsVisualizer : Editor { | |
private const string EDITOR_PREF_KEY = "_normals_length"; | |
private Mesh mesh; | |
private MeshFilter mf; | |
private Vector3[] verts; |
NewerOlder