Skip to content

Instantly share code, notes, and snippets.

@jaywilliams
jaywilliams / convert_ascii.php
Created May 28, 2009 19:25
This simple function will remove any non-ASCII character. Feel free to fork and extend!
<?php
/**
* Remove any non-ASCII characters and convert known non-ASCII characters
* to their ASCII equivalents, if possible.
*
* @param string $string
* @return string $string
* @author Jay Williams <myd3.com>
* @license MIT License
* @link http://gist.github.com/119517
@imba-tjd
imba-tjd / .Cloud.md
Last active July 5, 2024 01:38
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@coolprobn
coolprobn / date_in_preferred_time_zone.rb
Created June 19, 2024 15:18
Convert any DateTime to the timezone you prefer while still keeping the same date and time - Ruby on Rails
def date_in_danish_time(date_time)
date_array =
date_time.strftime("%Y %m %d").split.map { |string| Integer(string, 0) }
danish_date = Date.new(*date_array).in_time_zone("Copenhagen")
# extracting offset from the date will help us in also taking care of Daylight Saving
danish_date_offset = danish_date.formatted_offset
date_time_array =
date_time
.strftime("%Y %m %d %H %M %S")
@BrastenXBL
BrastenXBL / ae.gd
Created July 5, 2024 00:50
An Autoload hack for Godot Android editor to pre-test for NULL crashes.
class_name GodotAndroidEditorRuntimeErrorDebugger
extends Node
## Singleton(Autoload) containing global helper methods for the Android Editor.
##
## This class is intended to be used as a Singleton(Autoload), the [code]gdaererrd[/code] plug-in will
## automatically add [code]aerr[/code] as an Autoload. The Singleton name and method names are
## intended for easy typing on QWERTY digital keyboards found on phones and tablets.[br]
## [br]
## Use [code]aerr.t(arg)[/code] to test if a single variable is_instance_valid().[br]
## Failure will cause the program to print the error to console Output.
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active July 5, 2024 01:32
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

local function Chinese()
-- 简体拼音
hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC")
end
local function English()
-- ABC
hs.keycodes.currentSourceID("com.apple.keylayout.ABC")
end
@Calvin-L
Calvin-L / entityfixer.py
Last active July 5, 2024 01:23
Rewriter to fix malformed XML generated by the "SMS Backup & Restore" app
# Copyright (c) 2018, 2023 Calvin Loncaric
#
# 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
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@jirutka
jirutka / webdav_treat_osx.conf
Created April 14, 2013 00:28
Nginx optimization for WebDAV access from OS X Finder. This config snippet ensures that nginx will ignore requests for useless dot files generated by the Finder (.DS_Store, ._*, …)
#
# Ignore requests for useless dot files generated by OS X Finder (WebDAV).
#
# This little hack speeds-up a WebDAV access from the Finder significantly and
# also prevents messing storage with these annoying files.
#
location ~ \.(_.*|DS_Store|Spotlight-V100|TemporaryItems|Trashes|hidden)$ {
access_log off;
error_log off;
@curran
curran / README.md
Last active July 5, 2024 01:13
Simplemaps World Cities Database

A dataset about cities of the world.

Downloaded from Simplemaps: World Cities Database.

A new file worldcitiesReduced.csv was created by manually removing columns not deemed necessary for initial visualization of this data.

@ih2502mk
ih2502mk / list.md
Last active July 5, 2024 01:10
Quantopian Lectures Saved