An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 Ismael Celis | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
# Backbone CoffeeScript Helpers by M@ McCray. | |
# Source: http://gist.github.com/625893 | |
# | |
# Use Backbone classes as native CoffeeScript classes: | |
# | |
# class TaskController extends Events | |
# | |
# class TaskView extends View | |
# tagName: 'li' | |
# @SRC: '<div class="icon">!</div><div class="name"><%= name %></div>' |
class Avatar < ActiveRecord::Base | |
attr_accessor :content_type, :original_filename, :image_data | |
before_save :decode_base64_image | |
has_attached_file :image, | |
PAPERCLIP_CONFIG.merge( | |
:styles => { | |
:thumb => '32x32#', | |
:medium => '64x64#', |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#!/usr/bin/env perl | |
# | |
# Find unused CSS selectors by crawling a list of URLs | |
# (--url, even more than one) and matching all elements in | |
# a page to find out which selectors are never used across | |
# all given URLs | |
# | |
# Usage: | |
# ./find-unused-css-selectors.pl --css file.css --url http://some.url [--url http://some.other.url ...] | |
# |
import "phoenix_html" | |
import "bootstrap" | |
import "jquery" | |
import "toastr" | |
// ... |
#include <FastLED.h> | |
// fadeTowardColor example code. | |
// | |
// Sample code that includes a function for fading one RGB color toward a target RGB color | |
// Also includes a function for fading a whole array of pixels toward a given color | |
// | |
// Both of these functions _modify_ the existing color, in place. | |
// | |
// All fades are done in RGB color space. |
/* | |
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck. | |
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140 | |
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs. | |
*/ | |
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b}; | |
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}}); |
import UploadAdapter from './upload_adapter'; | |
function CustomUploadAdapterPlugin( editor ) { | |
editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => { | |
// Configure the URL to the upload script in your back-end here! | |
return new UploadAdapter( loader, editor ); | |
}; | |
} | |
import { Controller } from "stimulus" |