Skip to content

Instantly share code, notes, and snippets.

@masaeedu
masaeedu / shittyvariadics.cs
Last active November 30, 2020 13:53
Variadic experiments
using System;
using System.Linq.Expressions;
using VMware.Vim;
namespace AgentAutomation.VimExtensions
{
class Foo
{
static void Main()
{
/* new versions: https://github.com/alhimik45/dark-vkontakte-style */
@-moz-document regexp("https?://new\.vk\.com(?!(/stats)).*") {
#pv_box, .pv_reply_form_wrap, .narrow_column, .im-page--history-new-bar, .feed_row, .post, .profile_info_header_wrap > *, .ui_search, #stl_bg, .ui_tabs_header, #wk_box, .wk_history_tabs, .web_cam_photo, .photos_choose_upload_area, .im-page--history-new-bar > span, .page_media_thumbed_link, .mention_tt_actions, .mv_controls, .feedback_row_answer, .feedback_row_clickable:hover:not(.feedback_row_touched), .im-mess.im-mess_gift, .eltt, .wall_module .reply, * [class*="_header"] {
background: none !important; }
.page_block, .page_media_poll_wrap {
background-color: transparent !important; }
.flat_button, .module_header, * [class*="box_title"] {
background-color: rgba(66, 66, 66, 0.5) !important; }
@Sigmus
Sigmus / gulpfile.js
Last active November 15, 2017 11:55
gulpfile.js with browserify, reactify, watchify and gulp-notify.
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var watchify = require('watchify');
var notify = require("gulp-notify");
var scriptsDir = './scripts';
var buildDir = './build';
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@chrillo
chrillo / star.js
Created November 23, 2011 14:07
Draw a star in html canvas
/*
takes the x,y coordinates, the number of spikes, the inner and the outer radius of the spikes
*/
function drawStar(ctx,cx,cy,spikes,r0,r1){
var rot=Math.PI/2*3,x=cx,y=cy,step=Math.PI/spikes
ctx.strokeSyle="#000";
ctx.beginPath();