Skip to content

Instantly share code, notes, and snippets.

View zdychacek's full-sized avatar

Ondřej Ždych zdychacek

View GitHub Profile
@mkusher
mkusher / build.js
Last active October 14, 2019 14:50
Browserify project with tsify
var gulp = require("gulp");
var browserify = require("browserify");
var babelify = require("babelify");
var source = require("vinyl-source-stream");
var config = {
src: "index.js",
filename: "bundle.js",
dest: "./"
};
var extensions = ['.js', '.ts', '.json'];
anonymous
anonymous / sublime_text3_crack.md
Created June 7, 2015 04:58
Sublime Text 3092 3083 latest crack Win32 Win64 Linux64 Linux32 OSX Mac MacOS

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
@rupl
rupl / url-shortcuts.txt
Created May 21, 2015 04:52
Using Chrome's custom search engines as shortcuts!
Command | URL | Example | Comment
--------+-----------------------------------------------------------------+---------------------+-------------------
gh | https://github.com/%s | gh rupl/unfold | GitHub repo
npm | https://www.npmjs.com/package/%s | npm gulp-sass | npm module
wpt | http://www.webpagetest.org/?url=%s | wpt example.com | WebPageTest.org
psi | https://developers.google.com/speed/pagespeed/insights/?url=%s | psi example.com | PageSpeed Insights
acme | https://client.atlassian.net/browse/ACME-%s | acme 1234 | Clients' tickets
@rootical
rootical / browserify_watchify_babelify.js
Last active September 23, 2017 16:40
Gulp task example of using Browserify, Watchify, Babelify, Browser Sync, ngAnnoatate with ES6 source maps.
var gulp = require('gulp');
var gulpif = require('gulp-if');
var sourcemaps = require('gulp-sourcemaps');
var util = require('util');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var watchify = require('watchify');
var browserify = require('browserify');
var browserSync = require('browser-sync');
var babelify = require('babelify');
@danharper
danharper / CancellationTokenSource.js
Last active January 7, 2024 17:58
JavaScript "CancellationToken" for cancelling Async/Promise functions
const CANCEL = Symbol();
class CancellationToken {
constructor() {
this.cancelled = false;
}
throwIfCancelled() {
if (this.isCancelled()) {
@tejainece
tejainece / main.cpp
Last active March 18, 2024 21:21
Shared pointer implementation in C++
#include<iostream>
#include "shared_ptr.hpp"
using namespace std;
class A {
public:
int i;
explicit A(int _i) : i(_i) {
}
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@teropa
teropa / angular_toc.md
Created November 11, 2013 18:39
A preliminary table of contents for "Build Your Own AngularJS"

0. Project Setup

Part 1: Scopes

1. Scopes and Digest

2. Scope Inheritance

3. Watching Collections

Part 2: Expressions And Filters

4. Lexing Expressions

5. Parsing Expressions

6. Expressions On The Scope

7. Creating Filters

@sio2boss
sio2boss / client-socket-reconnect.js
Created August 25, 2013 14:19
Node.js Re-connecting Socket
//
// Simple example of using net.Socket but here we capture the
// right events and attempt to re-establish the connection when
// is is closed either because of an error establishing a
// connection or when the server closes the connection.
//
// Requires
var net = require('net');
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>