Skip to content

Instantly share code, notes, and snippets.

View shikelong's full-sized avatar
🏠
Working from home

shikelong shikelong

🏠
Working from home
View GitHub Profile
@brikis98
brikis98 / BuilderNew.io
Created February 6, 2012 08:03
Seven Languages in Seven Weeks: Io, Day 3
OperatorTable addAssignOperator(":", "atParseHash")
Builder := Object clone do (
indent := ""
atParseHash := method(
key := call evalArgAt(0) asMutable removePrefix("\"") removeSuffix("\"")
value := call evalArgAt(1)
" #{key}=\"#{value}\"" interpolate
)
@rxaviers
rxaviers / gist:7360908
Last active January 5, 2025 14:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@demelziraptor
demelziraptor / get-sharepoint-access-token.py
Created February 16, 2014 19:34
Code example to get a Sharepoint Access Token to use with the Sharepoint REST API using a python 3 provider-hosted Sharepoint App (using cherrypy). This code takes the data POSTed to it when you click on the app in Sharepoint, and authenticates using OAuth to get the access token. To use the Sharepoint REST API with OAuth, the app needs to be re…
import cherrypy
import jwt
import urllib.parse, urllib.request
import json
SPSECRET = 'gpYucHkODHOv6JxZJ89Kihl9ncTiTrUCAbOaF1N6uJE='
cherrypy.config.update({'server.socket_port': 3005,
'server.ssl_module': 'builtin',
'server.ssl_certificate': 'cert.pem',
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@jinwei233
jinwei233 / event-simulate.js
Last active August 15, 2016 09:22
跨浏览器的事件模拟
// **跨浏览器的事件模拟**
// @keyword event-simulate,dispatchEvent,fireEvent,事件模拟
// @author [email protected]
// 现有的功能库非常长,而且基本都抄自 yui 的代码
// 比如:
// - https://github.com/totorojs/event-simulate
// - https://github.com/dxq613/event-simulate
// 有时我们只需要模拟简单的几个事件,这时候去 copy 一大段代码,或引入一个第三方库,显得不切实际
// 有一个 jQuery 的插件很小
// - https://github.com/eduardolundgren/jquery-simulate/blob/master/jquery.simulate.js
@lopspower
lopspower / README.md
Last active January 4, 2025 16:55
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@colin-han
colin-han / Functional Programming练习题.md
Last active May 10, 2022 06:32
Functional Programming练习题

一、理解函数式编程

1. 有一个Web服务,为你提供了如下的数据结构:

难度:★

var data = [
  {
    name: "Jamestown",
    population: 2047,
    temperatures: [-34, 67, 101, 87]

},

@elchele
elchele / cw7.cs
Last active November 23, 2020 06:20
Base C# class for interacting with Sugar 7 REST v10 API
/* SugarCRM v7 REST API Wrapper
*
* Date: May 13, 2014
*
* Author: Angel Magaña
*
* Contact: cheleguanaco[at]cheleguanaco.com
* cheleguanaco.com
*
*
@vman
vman / CSOM.MFA.cs
Last active December 17, 2021 17:41
SharePoint Online: Using CSOM with an account configured with Multi-factor Authentication (MFA)
using Microsoft.SharePoint.Client;
using OfficeDevPnP.Core;
using System;
namespace CSOMDemo
{
class Program
{
static void Main(string[] args)
{
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active December 10, 2024 09:36
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.