Skip to content

Instantly share code, notes, and snippets.

View paveljurca's full-sized avatar
🎯
Focusing

Pavel paveljurca

🎯
Focusing
View GitHub Profile
@CyberShadow
CyberShadow / fontawesome.d
Last active March 8, 2022 10:47
My i3bar script
module fontawesome;
// Version 4.6.3
enum FontAwesome : wchar
{
fa_500px = '\uf26e',
fa_adjust = '\uf042',
fa_adn = '\uf170',
fa_align_center = '\uf037',
@alexkirsz
alexkirsz / sixth-sense.js
Created May 23, 2016 18:56
Core hook of the Facebook Sixth Sense Chrome extension
function getUserId(fbid) {
return fbid.split(':')[1];
}
requireLazy(
['MercuryTypingReceiver', 'MercuryThreads', 'ShortProfiles'],
(MercuryTypingReceiver, MercuryThreads, ShortProfiles) => {
MercuryTypingReceiver
.get()

Monolithic repositories

  1. full-stack dependencies & modifications in one place
  2. independent deploys

We have a single large depot with almost all of Google's projects on it. This aids agile development and is much loved by our users, since it allows almost anyone to easily view almost any code, allows projects to share code, and allows engineers to move freely from project to project. Documentation and data is stored on the server as well as code.

Git Subtree

>Git subtree allows you to insert any repository as a sub-directory of another one. It is one of several ways Git projects can manage project dependencies.

@paulirish
paulirish / open-chrome-tabs-in-safari.scpt
Created April 4, 2016 00:24
open chrome tabs in safari
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari" to open location the_url
end repeat
end tell
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
// PHP verze zde: https://phpfashion.com/jak-overit-platne-ic-a-rodne-cislo
function checkDate(m, d, y) {
// discuss at: http://phpjs.org/functions/checkdate/
// original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Pyerre
// improved by: Theriault
// example 1: checkdate(12, 31, 2000);
// returns 1: true
<head>
...
<meta name="viewport" content="width=device-width">
...
</head>
<head>
...
<meta name="viewport" content="width=device-width">
...
</head>
@ob7
ob7 / convert-videos-for-web.sh
Last active May 2, 2024 03:16 — forked from jmwhittaker/gist:8516514
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
#!/bin/bash
#Scaling
#- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
#- Other options include setting both with & height
#- Watch out for sizing errors when not divisible by 2
if [[ ! "$1" || ! "$2" || ! "$3" ]] || [[ "$1" = '--help' ]]; then
if [[ "$1" = '--help' ]]; then
echo " "
@heshanlk
heshanlk / commerce-coupon-rule.md
Last active November 15, 2017 11:55
Drupal Commerce Coupon - Limit one coupon per order rule

#Drupal Commerce Coupon - Limit one coupon per order rule

{ "rules_no_double_coupons" : {
    "LABEL" : "No double coupons",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "commerce_coupon" ],
    "ON" : { "commerce_coupon_applied_to_cart" : [] },
    "IF" : [
 { "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "commerce_coupons" } },