// jQuery
$(document).ready(function() {
// code
})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(function() { | |
$('.page-blur-promo-overlay').remove(); | |
$('.page_missing_explanation_inner').remove(); | |
$('.autogen_class_views_read2_page_blur_promo').remove(); | |
$('.outer_page only_ie6_border blurred_page').remove(); | |
$('.page-blur-promo').removeClass('page-blur-promo'); | |
$('.page_blur_promo').remove(); | |
$('.absimg').css('opacity', '1.0'); | |
$('.text_layer').css('color', '#000'); | |
$('.text_layer').css('text-shadow', '0px 0px 0px #000'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'redis' | |
REDIS = Redis.new( url: "..." ) | |
def each_keys_chunk( pattern = nil, &block ) | |
opts = { count: 100 } | |
opts[:match] = pattern if pattern | |
cursor = 0 | |
loop do | |
cursor, keys = REDIS.scan( cursor, opts ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run this in your console | |
window.frames["panel"].document.querySelectorAll("ul").forEach(e => e.style.paddingLeft = "2em"); |
Snippets for my iOS Projects :D
- File Location for:
- User Defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import Foundation | |
struct NamedURL: Codable { | |
let name: String | |
let url: URL | |
} | |
struct PokeAPIResponse: Codable { | |
let results: [NamedURL] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mariabackup --stream=xbstream --backup --user root|pigz >mariadb-backup.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (I recommend understanding the basics of this first: http://sequel.jeremyevans.net/rdoc/files/doc/object_model_rdoc.html) | |
# Extending the underlying dataset (http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Extending+the+underlying+dataset) | |
# The recommended way to implement table-wide logic by defining methods on the dataset using dataset_module: | |
class Post < Sequel::Model | |
dataset_module do | |
def posts_with_few_comments | |
where{num_comments < 30} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreditCard | |
attr_accessor :card, :store | |
def initialize(card_identifier) | |
@card = card_identifier | |
@store = { | |
amex: {begins_with: ["34", "37"], number_length: ["15"]}, | |
discover: {begins_with: ["6011"], number_length: ["16"]}, | |
mastercard: {begins_with: ["51","52","53","54","55"], number_length: ["16"]}, | |
visa: {begins_with: ["4"], number_length: ["13", "16"]}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CombineClient.swift | |
// CombineClient | |
// | |
// Created by Sarp Solakoglu on 14/11/2019. | |
// Copyright © 2019 Sarp Solakoglu. All rights reserved. | |
// | |
import Foundation | |
import Combine |
OlderNewer