Skip to content

Instantly share code, notes, and snippets.

View milksense's full-sized avatar
🙂

milksense

🙂
  • Decentralized
View GitHub Profile
@taterbase
taterbase / regex-interpolation.js
Created October 23, 2012 05:16
Regex for matching interpolated string var
//Finds all instances of #{} style interpolation like #{variable}
string.match(/#{[^}\r\n]*}/g);
@janily
janily / Breakpoints
Created January 16, 2014 11:36
Mobile-first CSS Media Queries Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@fijiwebdesign
fijiwebdesign / detect-available-fonts.js
Last active February 24, 2024 15:04
Detect available fonts with JS
/**
* JavaScript code to detect available availability of a
* particular font in a browser using JavaScript and CSS.
*
* Author : Lalit Patel
* Website: http://www.lalit.org/lab/javascript-css-font-detect/
* License: Apache Software License 2.0
* http://www.apache.org/licenses/LICENSE-2.0
* Version: 0.15 (21 Sep 2009)
* Changed comparision font to default from sans-default-default,
@Zhukn1
Zhukn1 / abc.txt
Last active November 26, 2022 07:26
Recursive Ailrine Logo downloading from web
AA,
AB,
AC,
AD,
AE,
AF,
AG,
AH,
AI,
AJ,
@mbader
mbader / SassMeister-input.scss
Last active January 14, 2021 11:52
Sass Staggered Transition Delay
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin staggered_transitions($nth:1,$items:2,$initial:0,$step:.1){
@for $i from $nth through $items{
&:nth-of-type(#{$i}){
transition-delay:#{$initial}s;
}
@mrmlnc
mrmlnc / electron-api.md
Last active August 25, 2023 07:23
Electron API

Базовые возможности

process — это объект, позволяющий получить информацию о типе запущенного процесса (рендеринг или основной процесс), версию Chrome и Electron, а также путь до выполняемого js-файла.

Пользовательские элементы DOM:

Объект File — это абстракция над нативным File, передающая стандартному HTML5 file API путь к физическому расположению файла в файловой системе пользователя.

@gokulkrishh
gokulkrishh / media-query.css
Last active June 18, 2024 18:06
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@henriquemenezes
henriquemenezes / android-generate-keystores.md
Last active June 4, 2024 14:58
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
@kremalicious
kremalicious / tor-openvpn.sh
Last active February 25, 2024 07:40
Install and configure Tor as proxy for all OpenVPN server traffic
# what we want:
# client -> OpenVPN -> Tor -> Internet
# Install & configure OpenVPN
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
# assumed OpenVPN configuration
# 10.8.0.1/24-Subnet
# tun0-Interface
@taterbase
taterbase / performance.worker.js
Created January 18, 2017 01:44
Performance Worker
onmessage = function() {
postMessage(performance.now())
}